Replace pusher with action cable (#178)

closes #43
This commit is contained in:
Pranav Raj S
2019-10-25 01:37:01 +05:30
committed by Sojan Jose
parent c0354364ff
commit f4358d9993
28 changed files with 144 additions and 165 deletions

View File

@@ -0,0 +1,15 @@
require 'rails_helper'
RSpec.describe RoomChannel, type: :channel do
let!(:user) { create(:user) }
before do
stub_connection
end
it 'subscribes to a stream when pubsub_token is provided' do
subscribe(pubsub_token: user.uid)
expect(subscription).to be_confirmed
expect(subscription).to have_stream_for(user.uid)
end
end