mirror of
https://github.com/foss42/apidash.git
synced 2025-06-20 22:24:08 +08:00
Update settings_model_test.dart
This commit is contained in:
@ -12,6 +12,7 @@ void main() {
|
|||||||
defaultUriScheme: "http",
|
defaultUriScheme: "http",
|
||||||
defaultCodeGenLang: CodegenLanguage.curl,
|
defaultCodeGenLang: CodegenLanguage.curl,
|
||||||
saveResponses: true,
|
saveResponses: true,
|
||||||
|
promptBeforeClosing: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
test('Testing toJson()', () {
|
test('Testing toJson()', () {
|
||||||
@ -25,6 +26,7 @@ void main() {
|
|||||||
"defaultUriScheme": "http",
|
"defaultUriScheme": "http",
|
||||||
"defaultCodeGenLang": "curl",
|
"defaultCodeGenLang": "curl",
|
||||||
"saveResponses": true,
|
"saveResponses": true,
|
||||||
|
"promptBeforeClosing": true
|
||||||
};
|
};
|
||||||
expect(sm.toJson(), expectedResult);
|
expect(sm.toJson(), expectedResult);
|
||||||
});
|
});
|
||||||
@ -40,6 +42,7 @@ void main() {
|
|||||||
"defaultUriScheme": "http",
|
"defaultUriScheme": "http",
|
||||||
"defaultCodeGenLang": "curl",
|
"defaultCodeGenLang": "curl",
|
||||||
"saveResponses": true,
|
"saveResponses": true,
|
||||||
|
"promptBeforeClosing": true
|
||||||
};
|
};
|
||||||
expect(SettingsModel.fromJson(input), sm);
|
expect(SettingsModel.fromJson(input), sm);
|
||||||
});
|
});
|
||||||
@ -53,6 +56,7 @@ void main() {
|
|||||||
defaultUriScheme: "http",
|
defaultUriScheme: "http",
|
||||||
defaultCodeGenLang: CodegenLanguage.curl,
|
defaultCodeGenLang: CodegenLanguage.curl,
|
||||||
saveResponses: false,
|
saveResponses: false,
|
||||||
|
promptBeforeClosing: true,
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
sm.copyWith(
|
sm.copyWith(
|
||||||
@ -64,7 +68,7 @@ void main() {
|
|||||||
|
|
||||||
test('Testing toString()', () {
|
test('Testing toString()', () {
|
||||||
const expectedResult =
|
const expectedResult =
|
||||||
"{isDark: false, alwaysShowCollectionPaneScrollbar: true, width: 300.0, height: 200.0, dx: 100.0, dy: 150.0, defaultUriScheme: http, defaultCodeGenLang: curl, saveResponses: true}";
|
"{isDark: false, alwaysShowCollectionPaneScrollbar: true, width: 300.0, height: 200.0, dx: 100.0, dy: 150.0, defaultUriScheme: http, defaultCodeGenLang: curl, saveResponses: true, promptBeforeClosing: true}";
|
||||||
expect(sm.toString(), expectedResult);
|
expect(sm.toString(), expectedResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user