forked from eatvio/eatvio_app
Merge pull request 'feat(tests)' (#876) from misha/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#876
This commit is contained in:
@@ -19,6 +19,25 @@ void main() {
|
||||
expect(PrefsKeys.marketingBottomSheetHasBeenShown.name, 'marketingBottomSheetHasBeenShown');
|
||||
expect(PrefsKeys.isEmailVerificationSkipped.name, 'isEmailVerificationSkipped');
|
||||
});
|
||||
|
||||
test('can be compared', () {
|
||||
expect(PrefsKeys.hasAnonymousTokenBeenSent == PrefsKeys.hasAnonymousTokenBeenSent, true);
|
||||
expect(PrefsKeys.hasAnonymousTokenBeenSent == PrefsKeys.welcomeScreenWasShowed, false);
|
||||
});
|
||||
|
||||
test('has correct index', () {
|
||||
expect(PrefsKeys.hasAnonymousTokenBeenSent.index, 0);
|
||||
expect(PrefsKeys.welcomeScreenWasShowed.index, 1);
|
||||
expect(PrefsKeys.registrationDate.index, 2);
|
||||
expect(PrefsKeys.marketingBottomSheetHasBeenShown.index, 3);
|
||||
});
|
||||
|
||||
test('can access by name', () {
|
||||
expect(PrefsKeys.values.byName('hasAnonymousTokenBeenSent'), PrefsKeys.hasAnonymousTokenBeenSent);
|
||||
expect(PrefsKeys.values.byName('welcomeScreenWasShowed'), PrefsKeys.welcomeScreenWasShowed);
|
||||
expect(PrefsKeys.values.byName('registrationDate'), PrefsKeys.registrationDate);
|
||||
expect(PrefsKeys.values.byName('marketingBottomSheetHasBeenShown'), PrefsKeys.marketingBottomSheetHasBeenShown);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user