Merge commit from fork
* Streaming: Ensure disabled users cannot connect to streaming * Streaming: Disconnect when the user is disabled --------- Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>
This commit is contained in:
@@ -476,12 +476,15 @@ RSpec.describe User do
|
||||
|
||||
let(:current_sign_in_at) { Time.zone.now }
|
||||
|
||||
before do
|
||||
user.disable!
|
||||
end
|
||||
|
||||
it 'disables user' do
|
||||
allow(redis).to receive(:publish)
|
||||
|
||||
user.disable!
|
||||
|
||||
expect(user).to have_attributes(disabled: true)
|
||||
|
||||
expect(redis)
|
||||
.to have_received(:publish).with("timeline:system:#{user.account.id}", Oj.dump(event: :kill)).once
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user