forked from eatvio/eatvio_app
feat(tests): test coverage is 70.5
This commit is contained in:
@@ -17,6 +17,25 @@ void main() {
|
||||
expect(PrefsKeys.registrationDate.name, 'registrationDate');
|
||||
expect(PrefsKeys.marketingBottomSheetHasBeenShown.name, 'marketingBottomSheetHasBeenShown');
|
||||
});
|
||||
|
||||
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