mirror of
https://github.com/foss42/apidash.git
synced 2025-06-19 13:27:34 +08:00
Fix tests for SettingsModel
This commit is contained in:
@ -17,6 +17,7 @@ void main() {
|
|||||||
activeEnvironmentId: null,
|
activeEnvironmentId: null,
|
||||||
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
||||||
workspaceFolderPath: null,
|
workspaceFolderPath: null,
|
||||||
|
isSSLDisabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
test('Testing toJson()', () {
|
test('Testing toJson()', () {
|
||||||
@ -34,6 +35,7 @@ void main() {
|
|||||||
"activeEnvironmentId": null,
|
"activeEnvironmentId": null,
|
||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null,
|
"workspaceFolderPath": null,
|
||||||
|
"isSSLDisabled": true,
|
||||||
};
|
};
|
||||||
expect(sm.toJson(), expectedResult);
|
expect(sm.toJson(), expectedResult);
|
||||||
});
|
});
|
||||||
@ -53,6 +55,7 @@ void main() {
|
|||||||
"activeEnvironmentId": null,
|
"activeEnvironmentId": null,
|
||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null,
|
"workspaceFolderPath": null,
|
||||||
|
"isSSLDisabled": true,
|
||||||
};
|
};
|
||||||
expect(SettingsModel.fromJson(input), sm);
|
expect(SettingsModel.fromJson(input), sm);
|
||||||
});
|
});
|
||||||
@ -69,11 +72,13 @@ void main() {
|
|||||||
promptBeforeClosing: true,
|
promptBeforeClosing: true,
|
||||||
activeEnvironmentId: null,
|
activeEnvironmentId: null,
|
||||||
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
||||||
|
isSSLDisabled: false,
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
sm.copyWith(
|
sm.copyWith(
|
||||||
isDark: true,
|
isDark: true,
|
||||||
saveResponses: false,
|
saveResponses: false,
|
||||||
|
isSSLDisabled: false,
|
||||||
),
|
),
|
||||||
expectedResult);
|
expectedResult);
|
||||||
});
|
});
|
||||||
@ -92,7 +97,8 @@ void main() {
|
|||||||
"promptBeforeClosing": true,
|
"promptBeforeClosing": true,
|
||||||
"activeEnvironmentId": null,
|
"activeEnvironmentId": null,
|
||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null
|
"workspaceFolderPath": null,
|
||||||
|
"isSSLDisabled": true
|
||||||
}''';
|
}''';
|
||||||
expect(sm.toString(), expectedResult);
|
expect(sm.toString(), expectedResult);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user