mimeTypeIs function

Checker<Response> mimeTypeIs(
  1. String expected
)

Implementation

Checker<Response> mimeTypeIs(String expected) => (Response resp) {
      if (expected != resp.mimeType) {
        return <Mismatch>[
          new EqualityMismatch(expected, resp.mimeType,
              customMessage: (m) =>
                  'Expected mimetype ${m.expected} but found ${m.actual}!')
        ];
      }
      return <Mismatch>[];
    };