diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-24 08:10:41 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-24 08:10:41 +0000 |
commit | be29227c12da043996cf05a489fa6b7ef26bea81 (patch) | |
tree | 41b1287d3635125a2319980566e1d7ee0e636a08 /test/integration/api_test | |
parent | 4e83057e765d73632102be6a76b45d97584a0739 (diff) | |
download | redmine-be29227c12da043996cf05a489fa6b7ef26bea81.tar.gz redmine-be29227c12da043996cf05a489fa6b7ef26bea81.zip |
reset Attachment.storage_path at the end of attachment tests
Attachment files are deleted when database data were deleted.
So, other tests fail.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7911 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r-- | test/integration/api_test/attachments_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index fa5117c8b..10b92328c 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -37,7 +37,6 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest context "GET" do should "return the attachment" do get '/attachments/7.xml', {}, :authorization => credentials('jsmith') - assert_response :success assert_equal 'application/xml', @response.content_type assert_tag :tag => 'attachment', @@ -57,8 +56,8 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest should "deny access without credentials" do get '/attachments/7.xml' - assert_response 401 + set_tmp_attachments_directory end end end @@ -66,16 +65,17 @@ class ApiTest::AttachmentsTest < ActionController::IntegrationTest context "/attachments/download/:id/:filename" do context "GET" do should "return the attachment content" do - get '/attachments/download/7/archive.zip', {}, :authorization => credentials('jsmith') - + get '/attachments/download/7/archive.zip', + {}, :authorization => credentials('jsmith') assert_response :success assert_equal 'application/octet-stream', @response.content_type + set_tmp_attachments_directory end should "deny access without credentials" do get '/attachments/download/7/archive.zip' - assert_response 302 + set_tmp_attachments_directory end end end |