check for nil values on client_secrets specs

This commit is contained in:
rusikf 2015-08-19 21:55:33 +03:00
parent 8daeb2cc1e
commit f4b3992f9f
1 changed files with 16 additions and 1 deletions

View File

@ -48,6 +48,21 @@ RSpec.describe Google::APIClient::ClientSecrets do
expect(hash["installed"]["client_secret"]).to be == 'i8YaXdGgiQ4_KrTVNGsB7QP1' expect(hash["installed"]["client_secret"]).to be == 'i8YaXdGgiQ4_KrTVNGsB7QP1'
end 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 end
end
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