diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-25 15:20:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-25 15:20:28 +0000 |
commit | 10a37f4b6bb10076ddfa168afe6192e9b817013c (patch) | |
tree | 5b1c9a64ade5dfdba2592e59c22f0e84f50bfac2 /test/integration | |
parent | 2b12146e810315c229e5140aa9ecd43da32dcca7 (diff) | |
download | redmine-10a37f4b6bb10076ddfa168afe6192e9b817013c.tar.gz redmine-10a37f4b6bb10076ddfa168afe6192e9b817013c.zip |
Rails 3.1 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9004 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/attachments_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index 5e20449d4..a28914bbd 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -87,7 +87,7 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest should "return the token" do set_tmp_attachments_directory assert_difference 'Attachment.count' do - post '/uploads.xml', 'File content', {'Content-Type' => 'application/octet-stream'}.merge(credentials('jsmith')) + post '/uploads.xml', 'File content', {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) assert_response :created assert_equal 'application/xml', response.content_type @@ -112,7 +112,7 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest should "not accept other content types" do set_tmp_attachments_directory assert_no_difference 'Attachment.count' do - post '/uploads.xml', 'PNG DATA', {'Content-Type' => 'image/png'}.merge(credentials('jsmith')) + post '/uploads.xml', 'PNG DATA', {"CONTENT_TYPE" => 'image/png'}.merge(credentials('jsmith')) assert_response 406 end end @@ -121,7 +121,7 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest set_tmp_attachments_directory with_settings :attachment_max_size => 1 do assert_no_difference 'Attachment.count' do - post '/uploads.xml', ('x' * 2048), {'Content-Type' => 'application/octet-stream'}.merge(credentials('jsmith')) + post '/uploads.xml', ('x' * 2048), {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) assert_response 422 assert_tag 'error', :content => /exceeds the maximum allowed file size/ end |