Fix RequestModel test

This commit is contained in:
Ankit Mahato
2023-04-24 08:54:54 +05:30
parent adfd049c56
commit e44be1b62b
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:apidash/consts.dart'; import 'package:apidash/consts.dart';
import 'package:apidash/utils/utils.dart' show mapToRows, rowsToMap; import 'package:apidash/utils/utils.dart' show mapToRows, rowsToMap;
import 'kvrow_model.dart'; import 'kvrow_model.dart';
@ -185,8 +186,8 @@ class RequestModel {
other.name == name && other.name == name &&
other.description == description && other.description == description &&
other.requestTabIndex == requestTabIndex && other.requestTabIndex == requestTabIndex &&
other.requestHeaders == requestHeaders && listEquals(other.requestHeaders, requestHeaders) &&
other.requestParams == requestParams && listEquals(other.requestParams, requestParams) &&
other.requestBodyContentType == requestBodyContentType && other.requestBodyContentType == requestBodyContentType &&
other.requestBody == requestBody && other.requestBody == requestBody &&
other.responseStatus == responseStatus && other.responseStatus == responseStatus &&

View File

@ -109,11 +109,11 @@ void main() {
test('Testing toJson', () { test('Testing toJson', () {
expect(requestModelDup.toJson(), requestModelAsJson); expect(requestModelDup.toJson(), requestModelAsJson);
}); });
/*
test('Testing fromJson', () { test('Testing fromJson', () {
expect(RequestModel.fromJson(requestModelDup.toJson()), requestModelDup); final modelFromJson = RequestModel.fromJson(requestModelAsJson);
expect(modelFromJson, requestModelDup);
}); });
*/
final requestModeDupString = [ final requestModeDupString = [
"Request Id: 1", "Request Id: 1",