Upstream sync master

This commit is contained in:
Senad Uka
2020-06-09 06:35:40 +02:00
parent 64bda6eab6
commit cd5bbaeb62
26 changed files with 255 additions and 62 deletions

View File

@@ -79,6 +79,13 @@ RSpec.describe ZoomGateway do
expect(ZoomGateway.enable_recordings?).to be_falsey
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 ".find_meeting" do
@@ -117,9 +124,7 @@ RSpec.describe ZoomGateway do
end
it 'raises an exception' do
allow(ENV).to receive(:[]).and_call_original
allow(ENV).to receive(:[]).with('ZOOM_USER_TYPE').and_return('pro')
allow(ENV).to receive(:[]).with('ZOOM_PRO_USERS_LIMIT').and_return('2')
stub_env_variables(ZOOM_USER_TYPE: 'pro', ZOOM_PRO_USERS_LIMIT: 2)
expect { gateway.create_host('host-email@address') }.to raise_error(ZoomGateway::TooManyHosts)
end
@@ -133,11 +138,4 @@ RSpec.describe ZoomGateway do
end
end
private
def stub_env_variable(name, value)
allow(ENV).to receive(:[]).and_call_original
allow(ENV).to receive(:[]).with(name.to_s).and_return(value.to_s)
end
end