generated from digitalcredentials/isomorphic-lib-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb58bab
commit 54b1997
Showing
4 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import nock from 'nock' | ||
|
||
export default () => { | ||
nock('http://localhost:4008', { encodedQueryParams: true }) | ||
.post('/credentials/status', { | ||
credentialId: 'urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1', | ||
credentialStatus: [{ type: 'BitstringStatusListCredential', status: 'revoked' }] | ||
}) | ||
.reply(200, { code: 200, message: 'Credential status successfully updated.' }, [ | ||
'X-Powered-By', | ||
'Express', | ||
'Access-Control-Allow-Origin', | ||
'*', | ||
'Content-Type', | ||
'application/json; charset=utf-8', | ||
'Content-Length', | ||
'64', | ||
'ETag', | ||
'W/"40-QIRY/d4PUONYie1grSHLdg5/hcs"', | ||
'Date', | ||
'Wed, 23 Aug 2023 20:42:41 GMT', | ||
'Connection', | ||
'keep-alive', | ||
'Keep-Alive', | ||
'timeout=5' | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import nock from 'nock' | ||
|
||
export default () => { | ||
nock('http://localhost:4008', { encodedQueryParams: true }) | ||
.post('/credentials/status', { | ||
credentialId: 'kj09ij', | ||
credentialStatus: [{ type: 'BitstringStatusListCredential', status: 'revoked' }] | ||
}) | ||
.reply(404, { code: 404, message: 'Credential ID not found.' }, [ | ||
'X-Powered-By', | ||
'Express', | ||
'Access-Control-Allow-Origin', | ||
'*', | ||
'Content-Type', | ||
'application/json; charset=utf-8', | ||
'Content-Length', | ||
'49', | ||
'ETag', | ||
'W/"31-lbV74I+iXZStkOsz/GAY1mIZewQ"', | ||
'Date', | ||
'Wed, 23 Aug 2023 20:44:24 GMT', | ||
'Connection', | ||
'keep-alive', | ||
'Keep-Alive', | ||
'timeout=5' | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import nock from 'nock' | ||
|
||
export default () => { | ||
nock('http://localhost:4008', { encodedQueryParams: true }) | ||
.post('/credentials/status', { | ||
credentialId: 'urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1', | ||
credentialStatus: [{ type: 'BitstringStatusListCredential', status: 'revoked' }] | ||
}) | ||
.reply(200, 'Credential status successfully updated', [ | ||
'X-Powered-By', | ||
'Express', | ||
'Access-Control-Allow-Origin', | ||
'*', | ||
'Content-Type', | ||
'text/html; charset=utf-8', | ||
'Content-Length', | ||
'38', | ||
'ETag', | ||
'W/"26-5PplkKqVB9H6fTLVTOo/weOUkgE"', | ||
'Date', | ||
'Wed, 23 Aug 2023 13:01:55 GMT', | ||
'Connection', | ||
'keep-alive', | ||
'Keep-Alive', | ||
'timeout=5' | ||
]) | ||
} |