-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ramon Candel
authored and
Ramon Candel
committed
Oct 1, 2024
1 parent
e7586b7
commit b4a9d88
Showing
3 changed files
with
37 additions
and
9 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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import sinon from 'sinon'; | ||
import { Users } from '../../../src/drive'; | ||
import { headersWithToken } from '../../../src/shared/headers'; | ||
import { ChangePasswordPayload } from '../../../src/drive/users/types'; | ||
import { ChangePasswordPayloadNew } from '../../../src/drive/users/types'; | ||
import { ApiSecurity, AppDetails } from '../../../src/shared'; | ||
import { headersWithToken } from '../../../src/shared/headers'; | ||
import { HttpClient } from '../../../src/shared/http/client'; | ||
|
||
const httpClient = HttpClient.create(''); | ||
|
@@ -100,7 +100,7 @@ describe('# users service tests', () => { | |
const email = '[email protected]'; | ||
const callStub = sinon.stub(httpClient, 'post').resolves({ | ||
publicKey: 'publicKey', | ||
user: { uuid: 'exampleUuid', email } | ||
user: { uuid: 'exampleUuid', email }, | ||
}); | ||
|
||
// Act | ||
|
@@ -110,7 +110,7 @@ describe('# users service tests', () => { | |
expect(callStub.firstCall.args).toEqual(['/users/pre-create', { email }, headers]); | ||
expect(body).toEqual({ | ||
publicKey: 'publicKey', | ||
user: { uuid: 'exampleUuid', email } | ||
user: { uuid: 'exampleUuid', email }, | ||
}); | ||
}); | ||
}); | ||
|
@@ -120,7 +120,7 @@ describe('# users service tests', () => { | |
// Arrange | ||
const { client, headers } = clientAndHeaders(); | ||
const callStub = sinon.stub(httpClient, 'patch').resolves({}); | ||
const payload: ChangePasswordPayload = { | ||
const payload: ChangePasswordPayloadNew = { | ||
currentEncryptedPassword: '1', | ||
encryptedMnemonic: '2', | ||
encryptedPrivateKey: '3', | ||
|