Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBL-1375: Change example data in TwoFactorViewModelTests #2041

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Library/ViewModels/TwoFactorViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class TwoFactorViewModelTests: TestCase {

self.isFormValid.assertValues([false])

self.vm.inputs.email("gina@kickstarter.com", password: "blah")
self.vm.inputs.email("user@example.com", password: "password")

self.isFormValid.assertValues([false])

Expand All @@ -59,7 +59,7 @@ final class TwoFactorViewModelTests: TestCase {

self.isFormValid.assertValues([false])

self.vm.inputs.facebookToken("204938023948")
self.vm.inputs.facebookToken("token")

self.isFormValid.assertValues([false])

Expand All @@ -78,7 +78,7 @@ final class TwoFactorViewModelTests: TestCase {

func testLogin_withEmailPasswordFlow() {
self.vm.inputs.viewWillAppear()
self.vm.inputs.email("gina@kickstarter.com", password: "lkjkl")
self.vm.inputs.email("user@example.com", password: "password")
self.vm.inputs.codeChanged("454545")
self.vm.inputs.submitPressed()

Expand All @@ -99,7 +99,7 @@ final class TwoFactorViewModelTests: TestCase {

func testLogin_withFacebookFlow() {
self.vm.inputs.viewWillAppear()
self.vm.inputs.facebookToken("293jhapiapdoi")
self.vm.inputs.facebookToken("token")
self.vm.inputs.codeChanged("454545")

self.vm.inputs.submitPressed()
Expand Down Expand Up @@ -129,7 +129,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(loginError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.email("gina@kickstarter.com", password: "lkjkl")
self.vm.inputs.email("user@example.com", password: "password")
self.vm.inputs.codeChanged("454545")
self.vm.inputs.submitPressed()

Expand All @@ -149,7 +149,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(loginError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.facebookToken("2934ohhailisa")
self.vm.inputs.facebookToken("token")
self.vm.inputs.codeChanged("454545")
self.vm.inputs.submitPressed()

Expand All @@ -169,7 +169,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(loginError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.email("gina@kickstarter.com", password: "lkjkl")
self.vm.inputs.email("user@example.com", password: "password")
self.vm.inputs.codeChanged("454545")
self.vm.inputs.submitPressed()

Expand All @@ -189,7 +189,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(loginError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.facebookToken("2934ohhailisa")
self.vm.inputs.facebookToken("token")
self.vm.inputs.codeChanged("454545")
self.vm.inputs.submitPressed()

Expand All @@ -209,7 +209,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(resendCodeResponse: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.email("gina@kickstarter.com", password: "lkjkl")
self.vm.inputs.email("user@example.com", password: "password")
self.vm.inputs.resendPressed()

self.isLoading.assertValues([true, false])
Expand All @@ -228,7 +228,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(resendCodeResponse: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.facebookToken("2934ohhailisa")
Copy link
Contributor

@scottkicks scottkicks Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

self.vm.inputs.facebookToken("token")
self.vm.inputs.resendPressed()

self.isLoading.assertValues([true, false])
Expand All @@ -247,7 +247,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(resendCodeError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.email("gina@kickstarter.com", password: "lkjkl")
self.vm.inputs.email("user@example.com", password: "password")
self.vm.inputs.resendPressed()

self.isLoading.assertValues([true, false])
Expand All @@ -266,7 +266,7 @@ final class TwoFactorViewModelTests: TestCase {

withEnvironment(apiService: MockService(resendCodeError: error)) {
self.vm.inputs.viewWillAppear()
self.vm.inputs.facebookToken("2934ohhailisa")
self.vm.inputs.facebookToken("token")
self.vm.inputs.resendPressed()

self.isLoading.assertValues([true, false])
Expand Down