mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Improved assertions
refs https://github.com/TryGhost/Toolbox/issues/283
This commit is contained in:
parent
a1e1feb125
commit
7252f03824
@ -73,7 +73,8 @@ describe('Webhook Service', function () {
|
|||||||
|
|
||||||
assert.equal(requestStub.called, true);
|
assert.equal(requestStub.called, true);
|
||||||
assert.equal(requestStub.args[0][0], 'http://example.com');
|
assert.equal(requestStub.args[0][0], 'http://example.com');
|
||||||
assert.deepEqual(requestStub.args[0][1].body, '{"data":[1]}');
|
assert.equal(requestStub.args[0][1].body, '{"data":[1]}');
|
||||||
|
assert.deepEqual(Object.keys(requestStub.args[0][1].headers), ['Content-Length', 'Content-Type', 'Content-Version']);
|
||||||
assert.equal(requestStub.args[0][1].headers['Content-Length'], 12);
|
assert.equal(requestStub.args[0][1].headers['Content-Length'], 12);
|
||||||
assert.equal(requestStub.args[0][1].headers['Content-Type'], 'application/json');
|
assert.equal(requestStub.args[0][1].headers['Content-Type'], 'application/json');
|
||||||
assert.match(requestStub.args[0][1].headers['Content-Version'], /v\d+\.\d+/);
|
assert.match(requestStub.args[0][1].headers['Content-Version'], /v\d+\.\d+/);
|
||||||
|
Loading…
Reference in New Issue
Block a user