From d4940bb462edfd6a531ebd397c9e7d7aca855539 Mon Sep 17 00:00:00 2001 From: Pranav Kakaraparti Date: Tue, 22 Aug 2023 15:33:36 -0500 Subject: [PATCH] fix: fixed broken tests --- __tests__/trust-relationship-api.spec.js | 10 +++++----- __tests__/trust-relationship-send-cancel.spec.js | 2 +- __tests__/trust-relationship-send-decline.spec.js | 2 +- __tests__/trust-relationship-send.spec.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/trust-relationship-api.spec.js b/__tests__/trust-relationship-api.spec.js index 3ba6ceaf..3b789d33 100644 --- a/__tests__/trust-relationship-api.spec.js +++ b/__tests__/trust-relationship-api.spec.js @@ -76,7 +76,7 @@ describe('Trust relationship management', () => { trust_request_type: 'send', requestee_wallet: seed.walletC.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); }); it('GET /trust_relationships', async () => { @@ -110,7 +110,7 @@ describe('Trust relationship management', () => { trust_request_type: 'send', requestee_wallet: seed.walletB.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); }); it(`${seed.walletB.name} try to request "manage" relationship to ${seed.wallet.name}`, async () => { @@ -124,7 +124,7 @@ describe('Trust relationship management', () => { trust_request_type: 'manage', requestee_wallet: seed.wallet.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); const trustRelationship = res.body; expect(trustRelationship).property('id').to.be.a.uuid('v4'); expect(trustRelationship) @@ -158,7 +158,7 @@ describe('Trust relationship management', () => { trust_request_type: 'yield', requestee_wallet: seed.wallet.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); const trustRelationship = res.body; expect(trustRelationship).property('id').to.be.a.uuid('v4'); expect(trustRelationship) @@ -167,7 +167,7 @@ describe('Trust relationship management', () => { trustRelationshipId = trustRelationship.id; }); - it(`${seed.wallet.name} accept yeild request`, async () => { + it(`${seed.wallet.name} accept yield request`, async () => { const res = await request(server) .post(`/trust_relationships/${trustRelationshipId}/accept`) .set('Content-Type', 'application/json') diff --git a/__tests__/trust-relationship-send-cancel.spec.js b/__tests__/trust-relationship-send-cancel.spec.js index 833f6d77..b3f1f653 100644 --- a/__tests__/trust-relationship-send-cancel.spec.js +++ b/__tests__/trust-relationship-send-cancel.spec.js @@ -55,7 +55,7 @@ describe('Trust relationship: cancel send', () => { trust_request_type: 'send', requestee_wallet: seed.walletB.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); trustRelationship = res.body; }); diff --git a/__tests__/trust-relationship-send-decline.spec.js b/__tests__/trust-relationship-send-decline.spec.js index 2b7fd842..6f57dc8f 100644 --- a/__tests__/trust-relationship-send-decline.spec.js +++ b/__tests__/trust-relationship-send-decline.spec.js @@ -62,7 +62,7 @@ describe('Trust relationship: decline send', () => { trust_request_type: 'send', requestee_wallet: seed.walletB.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); trustRelationship = res.body; expect(trustRelationship).property('id').to.be.a.uuid('v4'); expect(trustRelationship) diff --git a/__tests__/trust-relationship-send.spec.js b/__tests__/trust-relationship-send.spec.js index f542329f..5572d5ec 100644 --- a/__tests__/trust-relationship-send.spec.js +++ b/__tests__/trust-relationship-send.spec.js @@ -82,7 +82,7 @@ describe('Trust relationship: send', () => { trust_request_type: 'send', requestee_wallet: seed.walletB.name, }); - expect(res).property('statusCode').to.eq(200); + expect(res).property('statusCode').to.eq(201); trustRelationship = res.body; expect(trustRelationship).property('id').to.be.a.uuid('v4'); expect(trustRelationship)