diff --git a/test/models/name_value_model_test.dart b/test/models/name_value_model_test.dart index 831ca48d..f451cea9 100644 --- a/test/models/name_value_model_test.dart +++ b/test/models/name_value_model_test.dart @@ -5,13 +5,18 @@ void main() { const nmRow1 = NameValueModel(name: "harry", value: 23); test('Testing toString()', () { - const nmRow1Expected = {"name": "harry", "value": 23}; - expect(nmRow1.toJson(), nmRow1Expected); + const resultExpected = 'NameValueModel(name: harry, value: 23)'; + expect(nmRow1.toString(), resultExpected); + }); + + test('Testing toJson()', () { + const resultExpected = {"name": "harry", "value": 23}; + expect(nmRow1.toJson(), resultExpected); }); test('Testing copyWith()', () { - const nmRow2Expected = NameValueModel(name: "winter", value: "26"); - expect(nmRow1.copyWith(name: "winter", value: "26"), nmRow2Expected); + const resultExpected = NameValueModel(name: "winter", value: "26"); + expect(nmRow1.copyWith(name: "winter", value: "26"), resultExpected); }); test('Testing hashcode', () { diff --git a/test/models/request_model_test.dart b/test/models/request_model_test.dart index 4d08da65..16bc1e93 100644 --- a/test/models/request_model_test.dart +++ b/test/models/request_model_test.dart @@ -124,7 +124,7 @@ void main() { "Request Name: foss42 api", "Request Description: ", "Request Tab Index: 0", - "Request Headers: [{content-length: 18}, {content-type: application/json; charset=utf-8}]", + "Request Headers: [NameValueModel(name: content-length, value: 18), NameValueModel(name: content-type, value: application/json; charset=utf-8)]", "Request Params: null", "Request Body Content Type: ContentType.json", 'Request Body: {\n"text":"WORLD"\n}',