diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-11-03 11:56:04 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-11-03 11:56:04 +0100 |
commit | a2f8f9ad3da777869ba702ebf3c5b85b18991c28 (patch) | |
tree | e022e76af8f0eba7bd93417b6095abde6e206925 /spec | |
parent | 732f5380af5d688a152de9c5b4bb14ffb935dd2a (diff) | |
download | gitlab-ce-a2f8f9ad3da777869ba702ebf3c5b85b18991c28.tar.gz |
Fixed User sorting specsremove-duplicate-orders
The descriptions were not accurate and one particular spec seemingly
expected the wrong User row to be returned.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index c71cfb3ebe3..49e0bfdd2ec 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -663,24 +663,24 @@ describe User do @user1 = create :user, created_at: Date.today - 1, last_sign_in_at: Date.today - 1, name: 'Omega' end - it "sorts users as recently_signed_in" do + it "sorts users by the recent sign-in time" do expect(User.sort('recent_sign_in').first).to eq(@user) end - it "sorts users as late_signed_in" do + it "sorts users by the oldest sign-in time" do expect(User.sort('oldest_sign_in').first).to eq(@user1) end - it "sorts users as recently_created" do + it "sorts users in descending order by their creation time" do expect(User.sort('created_desc').first).to eq(@user) end - it "sorts users as late_created" do + it "sorts users in ascending order by their creation time" do expect(User.sort('created_asc').first).to eq(@user1) end - it "sorts users by name when nil is passed" do - expect(User.sort(nil).first).to eq(@user) + it "sorts users by id in descending order when nil is passed" do + expect(User.sort(nil).first).to eq(@user1) end end |