[Internal] Add route for widget testing (#199)

This commit is contained in:
Pranav Raj S
2019-11-01 12:53:01 +05:30
committed by Sojan Jose
parent f3fc542a5f
commit 5cc3543657
7 changed files with 58 additions and 10 deletions

View File

@@ -1,15 +0,0 @@
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

View File

@@ -0,0 +1,12 @@
require 'rails_helper'
describe WidgetTestsController, type: :controller do
let(:channel_widget) { create(:channel_widget) }
describe '#index' do
it 'renders the page correctly' do
get :index
expect(response.status).to eq 200
end
end
end