Commit 0cdf5e65ce5e7f01a4671e2f64b25fd45263a6bd
1 parent
cd5402eb
Exists in
master
and in
28 other branches
[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 | 296 | end |
297 | 297 | |
298 | 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 | 301 | end |
301 | 302 | |
302 | 303 | should 'user has presence status to know when online or offline' do | ... | ... |