From 8dcffaae68d04a49f9bc9dd4c618b0bf0c8a343f Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Mon, 25 Oct 2021 10:36:13 +0100 Subject: [PATCH] test(server/rr): wraps up basic read receipts tests --- packages/server/modules/core/tests/graph.spec.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/server/modules/core/tests/graph.spec.js b/packages/server/modules/core/tests/graph.spec.js index 74f932dd9..2926f1fb0 100644 --- a/packages/server/modules/core/tests/graph.spec.js +++ b/packages/server/modules/core/tests/graph.spec.js @@ -374,17 +374,6 @@ describe( 'GraphQL API Core @core-api', ( ) => { expect( res.body.errors ).to.not.exist expect( res.body.data.commitReceive ).to.equal( true ) - let res2 = await sendRequest( userB.token, { query: 'mutation($input: CommitReceivedInput!) { commitReceive(input: $input) }' , variables: { - input: { - streamId: ts1, - commitId: c1.id, - sourceApplication: 'tests', - message: 'Irrelevant!' - } - } - } ) - console.log( res2.body.errors ) - let res3 = await sendRequest( null, { query: 'mutation($input: CommitReceivedInput!) { commitReceive(input: $input) }' , variables: { input: { streamId: ts1, @@ -394,7 +383,10 @@ describe( 'GraphQL API Core @core-api', ( ) => { } } } ) - console.log( res3.body.errors ) + + expect( res3 ).to.be.json + expect( res3.body.errors ).to.exist + expect( res3.body.errors[0].extensions.code ).to.equal( 'FORBIDDEN' ) } ) it( 'Should delete a commit', async ( ) => {