Skip to content

Commit ef8aba6

Browse files
committed
Fix unit tests.
1 parent ce038ea commit ef8aba6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

appcheck/firebase-appcheck-debug/src/test/java/com/google/firebase/appcheck/debug/internal/DebugAppCheckProviderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
public class DebugAppCheckProviderTest {
5151

5252
private static final String DEBUG_SECRET = "debugSecret";
53-
private static final String ATTESTATION_TOKEN = "token";
53+
private static final String APP_CHECK_TOKEN = "appCheckToken";
5454
private static final String TIME_TO_LIVE = "3600s";
5555
private static final String API_KEY = "apiKey";
5656
private static final String APP_ID = "appId";
@@ -128,7 +128,7 @@ public void exchangeDebugToken_onSuccess_setsTaskResult() throws Exception {
128128
when(mockNetworkClient.exchangeAttestationForAppCheckToken(
129129
any(), eq(NetworkClient.DEBUG), eq(mockRetryManager)))
130130
.thenReturn(mockAppCheckTokenResponse);
131-
when(mockAppCheckTokenResponse.getAttestationToken()).thenReturn(ATTESTATION_TOKEN);
131+
when(mockAppCheckTokenResponse.getToken()).thenReturn(APP_CHECK_TOKEN);
132132
when(mockAppCheckTokenResponse.getTimeToLive()).thenReturn(TIME_TO_LIVE);
133133

134134
DebugAppCheckProvider provider =
@@ -141,7 +141,7 @@ public void exchangeDebugToken_onSuccess_setsTaskResult() throws Exception {
141141

142142
AppCheckToken token = task.getResult();
143143
assertThat(token).isInstanceOf(DefaultAppCheckToken.class);
144-
assertThat(token.getToken()).isEqualTo(ATTESTATION_TOKEN);
144+
assertThat(token.getToken()).isEqualTo(APP_CHECK_TOKEN);
145145
}
146146

147147
@Test

appcheck/firebase-appcheck-safetynet/src/test/java/com/google/firebase/appcheck/safetynet/internal/SafetyNetAppCheckProviderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class SafetyNetAppCheckProviderTest {
5656
private static final String APP_ID = "appId";
5757
private static final String PROJECT_ID = "projectId";
5858
private static final String SAFETY_NET_TOKEN = "safetyNetToken";
59-
private static final String ATTESTATION_TOKEN = "token";
59+
private static final String APP_CHECK_TOKEN = "appCheckToken";
6060
private static final String TIME_TO_LIVE = "3600s";
6161

6262
private FirebaseApp firebaseApp;
@@ -188,7 +188,7 @@ public void exchangeSafetyNetJwsForToken_onSuccess_setsTaskResult() throws Excep
188188
when(mockNetworkClient.exchangeAttestationForAppCheckToken(
189189
any(), eq(NetworkClient.SAFETY_NET), eq(mockRetryManager)))
190190
.thenReturn(mockAppCheckTokenResponse);
191-
when(mockAppCheckTokenResponse.getAttestationToken()).thenReturn(ATTESTATION_TOKEN);
191+
when(mockAppCheckTokenResponse.getToken()).thenReturn(APP_CHECK_TOKEN);
192192
when(mockAppCheckTokenResponse.getTimeToLive()).thenReturn(TIME_TO_LIVE);
193193

194194
SafetyNetAppCheckProvider provider =
@@ -207,7 +207,7 @@ public void exchangeSafetyNetJwsForToken_onSuccess_setsTaskResult() throws Excep
207207

208208
AppCheckToken token = task.getResult();
209209
assertThat(token).isInstanceOf(DefaultAppCheckToken.class);
210-
assertThat(token.getToken()).isEqualTo(ATTESTATION_TOKEN);
210+
assertThat(token.getToken()).isEqualTo(APP_CHECK_TOKEN);
211211
}
212212

213213
@Test

0 commit comments

Comments
 (0)