Skip to content

Commit b5e1e89

Browse files
authored
Pull version name from BuildConfig (#735)
1 parent 2b9128a commit b5e1e89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/test/java/com/amplifyframework/util/UserAgentTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package com.amplifyframework.util;
1717

1818
import com.amplifyframework.AmplifyException;
19+
import com.amplifyframework.core.BuildConfig;
1920
import com.amplifyframework.testutils.random.RandomString;
2021

2122
import org.junit.Before;
@@ -59,7 +60,7 @@ public void testDoubleConfiguration() throws AmplifyException {
5960
@Test
6061
public void testWithoutConfiguration() {
6162
final String userAgent = UserAgent.string();
62-
assertTrue(userAgent.startsWith("amplify-android/main ("));
63+
assertTrue(userAgent.startsWith("amplify-android/" + BuildConfig.VERSION_NAME + " ("));
6364
}
6465

6566
/**
@@ -72,7 +73,7 @@ public void testWithEmptyMap() throws AmplifyException {
7273
UserAgent.configure(platforms);
7374

7475
final String userAgent = UserAgent.string();
75-
assertTrue(userAgent.startsWith("amplify-android/main ("));
76+
assertTrue(userAgent.startsWith("amplify-android/" + BuildConfig.VERSION_NAME + " ("));
7677
}
7778

7879
/**

0 commit comments

Comments
 (0)