Add scope for human users.

This commit is contained in:
Guo Xiang Tan
2017-03-11 14:25:09 +08:00
parent 6ebddc42d1
commit 4d4a1a1552
3 changed files with 13 additions and 3 deletions

View File

@@ -1485,4 +1485,12 @@ describe User do
end
describe '.human_users' do
it 'should only return users with a positive primary key' do
Fabricate(:user, id: -2)
user = Fabricate(:user)
expect(User.human_users).to eq([user])
end
end
end