Feature: Availability Statuses (#874)

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-07-04 11:42:47 +05:30
committed by GitHub
parent bd87927576
commit c98907db49
35 changed files with 413 additions and 77 deletions

View File

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