Commit 26bfd338853e7fff017b997a921428d4feec7212
1 parent
37a1dde7
Exists in
master
and in
29 other branches
uploaded-file-test: avoid randomness on test
Define the appropriate user for the ActionTracker to avoid failure while running multiple tests.
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
test/unit/uploaded_file_test.rb
... | ... | @@ -323,6 +323,7 @@ class UploadedFileTest < ActiveSupport::TestCase |
323 | 323 | |
324 | 324 | should 'group trackers activity of image\'s upload' do |
325 | 325 | ActionTracker::Record.delete_all |
326 | + ActionTracker::Record.stubs(:current_user_from_model).returns(profile) | |
326 | 327 | gallery = fast_create(Gallery, :profile_id => profile.id) |
327 | 328 | count = ActionTracker::Record.find_all_by_verb('upload_image').count |
328 | 329 | image1 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :parent => gallery, :profile => profile) | ... | ... |