diff --git a/spec/google/api_client/client_secrets_spec.rb b/spec/google/api_client/client_secrets_spec.rb index ead9bf7e9..df32133ae 100644 --- a/spec/google/api_client/client_secrets_spec.rb +++ b/spec/google/api_client/client_secrets_spec.rb @@ -48,6 +48,21 @@ RSpec.describe Google::APIClient::ClientSecrets do expect(hash["installed"]["client_secret"]).to be == 'i8YaXdGgiQ4_KrTVNGsB7QP1' end + it 'should remove empty value' do + expect(hash["installed"]["redirect_uris"]).to be nil + end + + it 'should remove nil values' do + expect(hash["installed"]["issued_at"]).to be nil + end end end -end \ No newline at end of file + + context 'with folder wihout client_secrets.json' do + it "should raise exception" do + folder = File.join(FIXTURES_PATH) + expect { Google::APIClient::ClientSecrets.load(folder) }.to raise_exception(ArgumentError) + end + end + +end