assertJson method

TestResponse assertJson(
  1. Map<String, dynamic> data
)

Asserts that the response JSON contains the exact data.

Implementation

TestResponse assertJson(Map<String, dynamic> data) {
  final decoded = jsonDecode(raw.body);
  expect(decoded, data);
  return this;
}