Skip to content

Commit

Permalink
correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 28, 2025
1 parent 8f9eda5 commit 8e8efec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/unit/actionApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Action API', function () {
});
});

it('should return Bad Request result c1walletidentityif stub value is invalid', async function () {
it('should return Invalid ID result bc1walletidentityif stub value is invalid', async function () {
const request = httpMocks.createRequest({
method: 'GET',
url: 'test',
Expand All @@ -60,7 +60,7 @@ describe('Action API', function () {
.stub(actionService, 'getAction')
.returns({ wkIdentity: 'bc1walletidentity' });
await actionApi.getAction(request, res);
expect(res._getData()).to.deep.equal('Bad Request');
expect(res._getData()).to.deep.equal('Invalid ID');
});

it('should return error result bc1walletidentity if stub value is valid', async function () {
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/syncApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Sync API', function () {
});
});

it('should return Bad Request result 141 if stub value is false', async function () {
it('should return Invalid ID result bc1walletidentity141 if stub value is false', async function () {
const request = httpMocks.createRequest({
method: 'GET',
url: 'test',
Expand All @@ -58,10 +58,10 @@ describe('Sync API', function () {
});
await sinon.stub(syncService, 'getSync').returns(false);
await syncApi.getSync(request, res);
expect(res._getData()).to.deep.equal('Bad Request');
expect(res._getData()).to.deep.equal('Invalid ID');
});

it('should return Bad Request result bc1walletidentity141 if stub value is undefined', async function () {
it('should return Invalid ID result bc1walletidentity141 if stub value is undefined', async function () {
const request = httpMocks.createRequest({
method: 'GET',
url: 'test',
Expand All @@ -73,10 +73,10 @@ describe('Sync API', function () {
});
await sinon.stub(syncService, 'getSync').returns(undefined);
await syncApi.getSync(request, res);
expect(res._getData()).to.deep.equal('Bad Request');
expect(res._getData()).to.deep.equal('Invalid ID');
});

it('should return Bad Request result bc1walletidentity141 if stub value is null', async function () {
it('should return Invalid ID result bc1walletidentity141 if stub value is null', async function () {
const request = httpMocks.createRequest({
method: 'GET',
url: 'test',
Expand All @@ -88,7 +88,7 @@ describe('Sync API', function () {
});
await sinon.stub(syncService, 'getSync').returns(null);
await syncApi.getSync(request, res);
expect(res._getData()).to.deep.equal('Bad Request');
expect(res._getData()).to.deep.equal('Invalid ID');
});
});

Expand Down

0 comments on commit 8e8efec

Please sign in to comment.