Disconnect action cable when user is deactivated

ref: https://app.fizzy.do/5986089/cards/2785
This commit is contained in:
Mike Dalessio
2025-12-02 14:22:50 -05:00
parent 7f5213d715
commit a2e024c1b5
2 changed files with 10 additions and 1 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ class UserTest < ActiveSupport::TestCase
test "deactivate" do
assert_changes -> { users(:jz).active? }, from: true, to: false do
assert_changes -> { users(:jz).accesses.count }, from: 1, to: 0 do
users(:jz).deactivate
users(:jz).tap do |user|
user.stubs(:close_remote_connections).once
user.deactivate
end
end
end
end