This commit is contained in:
Ashita Prasad
2024-09-17 02:30:58 +05:30
parent abdd397cb7
commit 28a22218fc
3 changed files with 42 additions and 36 deletions

View File

@ -214,8 +214,13 @@ void main() {
findsOneWidget);
});
testWidgets('Testing Response Body, no mediaType', (tester) async {
var responseModelNoHeaders = responseModel.copyWith(headers: null);
testWidgets(
'Testing Response Body, no mediaType; shoud be default plaintext preview',
(tester) async {
var responseModelNoHeaders = responseModel.copyWith(
headers: null,
formattedBody: null,
);
var requestModelNoResponseHeaders =
testRequestModel.copyWith(httpResponseModel: responseModelNoHeaders);
@ -230,10 +235,8 @@ void main() {
),
);
expect(
find.text(
'Unknown Response Content-Type - ${responseModelNoHeaders.contentType}. $kUnexpectedRaiseIssue'),
findsOneWidget);
expect(find.text("Raw"), findsOneWidget);
expect(find.text('{"data":"world"}'), findsOneWidget);
});
testWidgets('Testing Response Body for No body view', (tester) async {