to satisfy

A specific implementation of the to satisfy assertion for use with messy.HttpResponse instances.

Asserts that a messy.HttpResponse instance satisfies the given spec:

var httpResponse = new messy.HttpResponse({
    headers: {
        'Content-Type': 'image/png'
    },
    body: require('fs').readFileSync('documentation/assertions/messy.HttpResponse/magic-pen-6-colours.jpg')
});
 
expect(httpResponse, 'to satisfy', { headers: { 'Content-Type': 'image/gif' } });
expected
 
Content-Type: image/png
 
to satisfy { headers: { 'Content-Type''image/gif' } }
 
 
Content-Type: image/png 
//
//
//
//
 
should equal image/gif
 
image/png
image/gif