Skip to content

Commit 34b969f

Browse files
committed
chore: Fixed createdAt in cNonce endpoint + remove useless functionality
1 parent 57e0995 commit 34b969f

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

packages/issuer-rest/lib/__tests__/nonceEndpoint.spec.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('Nonce Endpoint', () => {
7676
await new Promise((resolve) => setTimeout((v: void) => resolve(v), 500))
7777
})
7878

79-
it('should return fresh c_nonce without authorization', async () => {
79+
it('should return fresh c_nonce', async () => {
8080
const res = await requests(app).post('/nonce').send()
8181

8282
expect(res.statusCode).toEqual(200)
@@ -101,19 +101,6 @@ describe('Nonce Endpoint', () => {
101101
expect(storedNonce?.expiresAt).toBeGreaterThan(Math.floor(Date.now() / 1000))
102102
})
103103

104-
it('should return error with invalid access token', async () => {
105-
const res = await requests(app)
106-
.post('/nonce')
107-
.set('Authorization', 'Bearer invalid-token')
108-
.send()
109-
110-
expect(res.statusCode).toEqual(400)
111-
const actual = JSON.parse(res.text)
112-
expect(actual).toEqual({
113-
error: 'invalid_token'
114-
})
115-
})
116-
117104
it('should work when nonce endpoint is disabled', async () => {
118105
const disabledVcIssuer = new VcIssuer(
119106
{

0 commit comments

Comments
 (0)