| 49 | } // namespace |
| 50 | |
| 51 | TEST(OAuthClientTest, ParseOAuthResponse) { |
| 52 | const uint64 request_timestamp = 100; |
| 53 | string token; |
| 54 | uint64 expiration_timestamp; |
| 55 | TF_EXPECT_OK(OAuthClient().ParseOAuthResponse(kTokenJson, request_timestamp, |
| 56 | &token, &expiration_timestamp)); |
| 57 | EXPECT_EQ("1/fFAGRNJru1FTz70BzhT3Zg", token); |
| 58 | EXPECT_EQ(4020, expiration_timestamp); |
| 59 | } |
| 60 | |
| 61 | TEST(OAuthClientTest, GetTokenFromRefreshTokenJson) { |
| 62 | const string credentials_json = R"( |
nothing calls this directly
no test coverage detected