Chatwoot/spec/channels/room_channel_spec.rb
2019-11-01 12:53:01 +05:30

15 lines
348 B
Ruby

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