From 6f18470b650fc4bebbbf1908542a51b6be2d75a1 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Fri, 30 Oct 2015 09:04:19 -0500 Subject: [PATCH] Update readme --- test/api/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/api/README.md b/test/api/README.md index c7512049b1..5751dfb26a 100644 --- a/test/api/README.md +++ b/test/api/README.md @@ -88,13 +88,16 @@ it('makes the party creator the leader automatically', () => { }); ``` -If the test is checking that the request returns an error, use the `rejectedWith` syntax. +If the test is checking that the request returns an error, use the `.eventually.be.rejected.and.eql` syntax. ```js it('returns an error', () => { let api = requester(user); return expect(request.get('/groups/id-of-a-party-that-user-does-not-belong-to')) - .to.be.rejectedWith('Group not found or you don\'t have access.'); + .to.eventually.be.rejected.and.eql({ + code: 404, + text: t('messageGroupNotFound'), + }); }); ```