@@ -4,7 +4,7 @@ const assert = require('assert');
44const sinon = require ( 'sinon' ) ;
55const faker = require ( 'faker' ) ;
66const { createMembers, createOrganization } = require ( '../../helpers/organization' ) ;
7- const hashPassword = require ( '../../../src/utils/register/password/hash ' ) ;
7+ const scrypt = require ( '../../../src/utils/scrypt ' ) ;
88const registerOrganizationMembers = require ( '../../../src/utils/organization/registerOrganizationMembers' ) ;
99
1010describe ( '#create organization' , function registerSuite ( ) {
@@ -26,7 +26,7 @@ describe('#create organization', function registerSuite() {
2626
2727 it ( 'must be able to create organization and register user' , async function test ( ) {
2828 const sendInviteMailSpy = sinon . spy ( registerOrganizationMembers , 'call' ) ;
29- const generatePasswordSpy = sinon . spy ( hashPassword , 'call ' ) ;
29+ const generatePasswordSpy = sinon . spy ( scrypt , 'hash ' ) ;
3030
3131 const params = {
3232 name : faker . company . companyName ( ) ,
@@ -49,7 +49,7 @@ describe('#create organization', function registerSuite() {
4949 } ) ;
5050
5151 const [ registeredMember ] = await sendInviteMailSpy . returnValues [ 0 ] ;
52- const registeredMemberPassword = generatePasswordSpy . firstCall . args [ 1 ] ;
52+ const registeredMemberPassword = generatePasswordSpy . firstCall . args [ 0 ] ;
5353 const loginParams = {
5454 username : registeredMember . email ,
5555 password : registeredMemberPassword ,
0 commit comments