Upstream sync
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
require 'rails_helper'
|
||||
require 'zoom_gateway'
|
||||
|
||||
RSpec.describe ZoomGateway do
|
||||
let(:roles_list_response) { {"roles" => [{"name" => 'pro-directme-host', "id" => "host_role_id"}, {"name" => 'basic-directme-host', "id" => "host_role_id"}]} }
|
||||
@@ -10,7 +9,7 @@ RSpec.describe ZoomGateway do
|
||||
let(:meeting_hash) { {"id" => "meeting_id", "start_url" => "https://start_url", "join_url" => "https://join_url"} }
|
||||
let(:gateway) { ZoomGateway.new }
|
||||
|
||||
describe "constants" do
|
||||
describe "pseudo-constants" do
|
||||
context '.USER_TYPE_NAME' do
|
||||
it 'defaults to "basic"' do
|
||||
expect(ZoomGateway.USER_TYPE_NAME).to eq('basic')
|
||||
@@ -65,6 +64,15 @@ RSpec.describe ZoomGateway do
|
||||
end
|
||||
end
|
||||
|
||||
context '.ACCOUNT_NUMBER' do
|
||||
it 'depends on ENV["ZOOM_ACCOUNT_NUMBER"]' do
|
||||
stub_env_variable('ZOOM_ACCOUNT_NUMBER', 'xxx-yyy-zzz')
|
||||
expect(ZoomGateway.ACCOUNT_NUMBER).to eq('xxx-yyy-zzz')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'static methods' do
|
||||
context '.enable_recordings?' do
|
||||
it 'is truthy when ZOOM_ENABLE_RECORDINGS is set to true' do
|
||||
stub_env_variable('ZOOM_ENABLE_RECORDINGS', 'true')
|
||||
@@ -80,10 +88,9 @@ RSpec.describe ZoomGateway do
|
||||
end
|
||||
end
|
||||
|
||||
context '.ACCOUNT_NUMBER' do
|
||||
it 'depends on ENV["ZOOM_ACCOUNT_NUMBER"]' do
|
||||
stub_env_variable('ZOOM_ACCOUNT_NUMBER', 'xxx-yyy-zzz')
|
||||
expect(ZoomGateway.ACCOUNT_NUMBER).to eq('xxx-yyy-zzz')
|
||||
context '.host_role_name' do
|
||||
it 'returns given name with -directme-host prefix' do
|
||||
expect(ZoomGateway.host_role_name('prefix')).to eq('prefix-directme-host')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user