Commit f2e976883615dddbde74e493c400eb17a8f79e34
1 parent
66c0650c
Exists in
staging
and in
42 other branches
Avoid randomness on tests
Showing
2 changed files
with
3 additions
and
5 deletions
Show diff stats
test/unit/profile_test.rb
| ... | ... | @@ -363,7 +363,7 @@ class ProfileTest < ActiveSupport::TestCase |
| 363 | 363 | t2 = c.tasks.build; t2.save!; t2.finish |
| 364 | 364 | t3 = c.tasks.build; t3.save!; t3.finish |
| 365 | 365 | |
| 366 | - assert_equal [t2, t3], c.tasks.finished | |
| 366 | + assert_equivalent [t2, t3], c.tasks.finished | |
| 367 | 367 | end |
| 368 | 368 | |
| 369 | 369 | should 'responds to categories' do | ... | ... |
test/unit/uploaded_file_test.rb
| ... | ... | @@ -324,13 +324,11 @@ class UploadedFileTest < ActiveSupport::TestCase |
| 324 | 324 | should 'group trackers activity of image\'s upload' do |
| 325 | 325 | ActionTracker::Record.delete_all |
| 326 | 326 | gallery = fast_create(Gallery, :profile_id => profile.id) |
| 327 | - count = ActionTracker::Record.find_all_by_verb('upload_image').count | |
| 328 | 327 | image1 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :parent => gallery, :profile => profile) |
| 329 | - count += 1 | |
| 330 | - assert_equal count, ActionTracker::Record.find_all_by_verb('upload_image').count | |
| 328 | + assert_equal 1, ActionTracker::Record.find_all_by_verb('upload_image').count | |
| 331 | 329 | |
| 332 | 330 | image2 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/other-pic.jpg', 'image/jpg'), :parent => gallery, :profile => profile) |
| 333 | - assert_equal count, ActionTracker::Record.find_all_by_verb('upload_image').count | |
| 331 | + assert_equal 1, ActionTracker::Record.find_all_by_verb('upload_image').count | |
| 334 | 332 | end |
| 335 | 333 | |
| 336 | 334 | { | ... | ... |