Upstream sync master
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user