Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 1ce3207

Browse files
committed
test: Fix lingering apiKey tests.
1 parent 079c6a5 commit 1ce3207

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/integration/LoginEndpoints.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import { ethers } from 'ethers'
55
import { StreamrClient } from '../../src/StreamrClient'
66

77
import config from './config'
8+
import { fakePrivateKey } from '../utils'
89

910
describe('LoginEndpoints', () => {
1011
let client: StreamrClient
1112

1213
const createClient = (opts = {}) => new StreamrClient({
1314
...config.clientOptions,
1415
auth: {
15-
apiKey: 'tester1-api-key',
16+
privateKey: fakePrivateKey()
1617
},
1718
autoConnect: false,
1819
autoDisconnect: false,
@@ -73,18 +74,11 @@ describe('LoginEndpoints', () => {
7374
})
7475

7576
describe('API key login', () => {
76-
it('should fail to get a session token', async () => {
77+
it('should fail', async () => {
7778
await expect(async () => {
7879
await client.loginWithApiKey('apikey')
7980
}).rejects.toThrow()
8081
})
81-
82-
it('should get a session token', async () => {
83-
const sessionToken = await client.loginWithApiKey('tester1-api-key')
84-
assert(sessionToken)
85-
assert(sessionToken.token)
86-
assert(sessionToken.expires)
87-
})
8882
})
8983

9084
describe('Username/password login', () => {

0 commit comments

Comments
 (0)