forked from eatvio/eatvio_app
feat(tests): menu, settings, remove icov, remove generated files from % tests
This commit is contained in:
45
test/fixtures/settings_fixtures.dart
vendored
Normal file
45
test/fixtures/settings_fixtures.dart
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
import 'package:eatvio_app/features/settings/models/oauth_account_model.dart';
|
||||
import 'package:eatvio_app/features/settings/models/profile_settings_model.dart';
|
||||
import 'fixture_reader.dart';
|
||||
|
||||
class SettingsFixtures {
|
||||
SettingsFixtures._();
|
||||
|
||||
static ProfileSettingsModel profileSettingsModel() {
|
||||
return ProfileSettingsModel.fromJson(
|
||||
FixtureReader.readAsMap('settings/profile_settings_response.json'),
|
||||
);
|
||||
}
|
||||
|
||||
static ProfileSettingsModel profileSettingsUpdatedModel() {
|
||||
return ProfileSettingsModel.fromJson(
|
||||
FixtureReader.readAsMap('settings/profile_settings_updated_response.json'),
|
||||
);
|
||||
}
|
||||
|
||||
static ProfileDetailsModel profileDetailsModel() {
|
||||
return ProfileDetailsModel.fromJson(
|
||||
FixtureReader.readAsMap('profile/profile_details_response.json'),
|
||||
);
|
||||
}
|
||||
|
||||
static ProfileModel profileModel() {
|
||||
return ProfileModel.fromJson(
|
||||
FixtureReader.readAsMap('profile/my_profile_response.json'),
|
||||
);
|
||||
}
|
||||
|
||||
static OAuthAccountsResponseModel oauthAccountsResponseModel() {
|
||||
return OAuthAccountsResponseModel.fromJson(
|
||||
FixtureReader.readAsMap('settings/oauth_accounts_response.json'),
|
||||
);
|
||||
}
|
||||
|
||||
static OAuthAccountsResponseModel oauthAccountsWithDataResponseModel() {
|
||||
return OAuthAccountsResponseModel.fromJson(
|
||||
FixtureReader.readAsMap('settings/oauth_accounts_with_data_response.json'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user