mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 07:35:47 +08:00
DEV: Add spec for not_staged user scope (#17042)
Making sure to test this new scope. Follow up to: 27d7b0c6de73cb0cd2bd5137b5a58c151bd83289 as well as: 3941bad0751fc2e59576d77bef531b0088571104
This commit is contained in:
parent
03732049ed
commit
852a2f1727
@ -1887,6 +1887,16 @@ RSpec.describe User do
|
||||
end
|
||||
end
|
||||
|
||||
describe '.not_staged' do
|
||||
let!(:user0) { Fabricate(:user, staged: true) }
|
||||
let!(:user1) { Fabricate(:user) }
|
||||
|
||||
it "doesn't return staged users" do
|
||||
expect(User.not_staged).to_not include(user0)
|
||||
expect(User.not_staged).to include(user1)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#publish_notifications_state' do
|
||||
it 'should publish the right message sorted by ID desc' do
|
||||
notification = Fabricate(:notification, user: user)
|
||||
|
Loading…
x
Reference in New Issue
Block a user