Skip to content

Commit 0b03084

Browse files
committed
Fixing test / adding new tests
1 parent 1837936 commit 0b03084

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/app/SalesforceSDKUpgradeManagerTest.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,24 @@ class SalesforceSDKUpgradeManagerTest {
174174
}
175175

176176
@Test
177-
fun testUpgradeAfter12() {
177+
fun testUpgradeFromBefore1302() {
178+
// Set version to a version before 13.0.2
179+
setVersion("12.2.0")
180+
181+
// Create public key for push notifications
182+
KeyStoreWrapper.getInstance().getRSAPublicString(PushService.pushNotificationKeyName)
183+
184+
// Upgrade to latest
185+
upgradeMgr.upgrade()
186+
187+
// Make sure re-registration is requested
188+
Assert.assertTrue(PushMessaging.reRegistrationRequested)
189+
}
190+
191+
@Test
192+
fun testUpgradeAfter1302() {
178193
// Set version to 12.0.0
179-
setVersion("12.0.0")
194+
setVersion("13.0.2")
180195

181196
// Create public key for push notifications
182197
KeyStoreWrapper.getInstance().getRSAPublicString(PushService.pushNotificationKeyName)

0 commit comments

Comments
 (0)