mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
Update settings_model_test.dart
This commit is contained in:
@ -18,6 +18,7 @@ void main() {
|
|||||||
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
||||||
workspaceFolderPath: null,
|
workspaceFolderPath: null,
|
||||||
isSSLDisabled: true,
|
isSSLDisabled: true,
|
||||||
|
isDashBotEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
test('Testing toJson()', () {
|
test('Testing toJson()', () {
|
||||||
@ -36,6 +37,7 @@ void main() {
|
|||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null,
|
"workspaceFolderPath": null,
|
||||||
"isSSLDisabled": true,
|
"isSSLDisabled": true,
|
||||||
|
"isDashBotEnabled": true,
|
||||||
};
|
};
|
||||||
expect(sm.toJson(), expectedResult);
|
expect(sm.toJson(), expectedResult);
|
||||||
});
|
});
|
||||||
@ -56,6 +58,7 @@ void main() {
|
|||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null,
|
"workspaceFolderPath": null,
|
||||||
"isSSLDisabled": true,
|
"isSSLDisabled": true,
|
||||||
|
"isDashBotEnabled": true,
|
||||||
};
|
};
|
||||||
expect(SettingsModel.fromJson(input), sm);
|
expect(SettingsModel.fromJson(input), sm);
|
||||||
});
|
});
|
||||||
@ -73,12 +76,14 @@ void main() {
|
|||||||
activeEnvironmentId: null,
|
activeEnvironmentId: null,
|
||||||
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
historyRetentionPeriod: HistoryRetentionPeriod.oneWeek,
|
||||||
isSSLDisabled: false,
|
isSSLDisabled: false,
|
||||||
|
isDashBotEnabled: false,
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
sm.copyWith(
|
sm.copyWith(
|
||||||
isDark: true,
|
isDark: true,
|
||||||
saveResponses: false,
|
saveResponses: false,
|
||||||
isSSLDisabled: false,
|
isSSLDisabled: false,
|
||||||
|
isDashBotEnabled: false,
|
||||||
),
|
),
|
||||||
expectedResult);
|
expectedResult);
|
||||||
});
|
});
|
||||||
@ -98,7 +103,8 @@ void main() {
|
|||||||
"activeEnvironmentId": null,
|
"activeEnvironmentId": null,
|
||||||
"historyRetentionPeriod": "oneWeek",
|
"historyRetentionPeriod": "oneWeek",
|
||||||
"workspaceFolderPath": null,
|
"workspaceFolderPath": null,
|
||||||
"isSSLDisabled": true
|
"isSSLDisabled": true,
|
||||||
|
"isDashBotEnabled": true
|
||||||
}''';
|
}''';
|
||||||
expect(sm.toString(), expectedResult);
|
expect(sm.toString(), expectedResult);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user