Commit 0cdf5e65ce5e7f01a4671e2f64b25fd45263a6bd

Authored by Rodrigo Souto
1 parent cd5402eb

[postgres-tests] Avoiding randomness on user test

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
test/unit/user_test.rb
@@ -296,7 +296,8 @@ class UserTest < ActiveSupport::TestCase @@ -296,7 +296,8 @@ class UserTest < ActiveSupport::TestCase
296 end 296 end
297 297
298 should 'be able to use [] operator to find users by login' do 298 should 'be able to use [] operator to find users by login' do
299 - assert_equal users(:ze), User['ze'] 299 + user = fast_create(User)
  300 + assert_equal user, User[user.login]
300 end 301 end
301 302
302 should 'user has presence status to know when online or offline' do 303 should 'user has presence status to know when online or offline' do