summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 11:41:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 11:41:10 +0000
commit64d843a4d7156c94f6444e225d7606a21a312180 (patch)
treee3fddcd6135e935b2c3dc99df76a7afb66231a8f /test
parent858e317e6ebe7b9d2a30fc0eb9f304cf3565821e (diff)
downloadredmine-64d843a4d7156c94f6444e225d7606a21a312180.tar.gz
redmine-64d843a4d7156c94f6444e225d7606a21a312180.zip
Rails 3.1 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9073 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/attachments_controller_test.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index 4deae88c8..d06d9e81a 100644
--- a/test/functional/attachments_controller_test.rb
+++ b/test/functional/attachments_controller_test.rb
@@ -264,15 +264,18 @@ class AttachmentsControllerTest < ActionController::TestCase
@request.session[:user_id] = 2
assert_difference 'issue.attachments.count', -1 do
- delete :destroy, :id => 1
+ assert_difference 'Journal.count' do
+ delete :destroy, :id => 1
+ assert_redirected_to '/projects/ecookbook'
+ end
end
- # no referrer
- assert_redirected_to '/projects/ecookbook'
assert_nil Attachment.find_by_id(1)
- j = issue.journals.find(:first, :order => 'created_on DESC')
+ j = Journal.first(:order => 'id DESC')
+ assert_equal issue, j.journalized
assert_equal 'attachment', j.details.first.property
assert_equal '1', j.details.first.prop_key
assert_equal 'error281.txt', j.details.first.old_value
+ assert_equal User.find(2), j.user
end
def test_destroy_wiki_page_attachment