comparison test/functional/documents_controller_test.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
178 @request.session[:user_id] = 2 178 @request.session[:user_id] = 2
179 assert_difference 'Attachment.count' do 179 assert_difference 'Attachment.count' do
180 post :add_attachment, :id => 1, 180 post :add_attachment, :id => 1,
181 :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}} 181 :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}}
182 end 182 end
183 attachment = Attachment.first(:order => 'id DESC') 183 attachment = Attachment.order('id DESC').first
184 assert_equal Document.find(1), attachment.container 184 assert_equal Document.find(1), attachment.container
185 end 185 end
186 end 186 end