-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1728 from OneSignal/user-model/unit-test-fixup
[User Model] Fix broken unit test compilation
- Loading branch information
Showing
7 changed files
with
135 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,9 @@ class UserManagerTests : FunSpec({ | |
val userManager = UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), MockHelper.propertiesModelStore(), languageContext) | ||
|
||
/* When */ | ||
val language = userManager.language | ||
userManager.language = "new-language" | ||
userManager.setLanguage("new-language") | ||
|
||
/* Then */ | ||
language shouldBe "custom-language" | ||
languageSlot.captured shouldBe "new-language" | ||
} | ||
|
||
|
@@ -144,11 +142,11 @@ class UserManagerTests : FunSpec({ | |
|
||
/* When */ | ||
val subscriptions = userManager.subscriptions | ||
userManager.addEmailSubscription("[email protected]") | ||
userManager.removeEmailSubscription("[email protected]") | ||
userManager.addEmail("[email protected]") | ||
userManager.removeEmail("[email protected]") | ||
|
||
userManager.addSmsSubscription("+15558675309") | ||
userManager.removeSmsSubscription("+15558675309") | ||
userManager.addSms("+15558675309") | ||
userManager.removeSms("+15558675309") | ||
|
||
/* Then */ | ||
subscriptions shouldBe subscriptionList | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.