GitHub

DaffCustomerTestingDriver

import { DaffCustomerTestingDriver } from '@daffodil/customer/driver/testing'

A basic customer driver that creates mock customer results of different kinds. For testing purposes.

@Injectable()
class DaffCustomerTestingDriver implements DaffCustomerDriverInterface {
  changeEmail(
    email: string
    password: string
  ): Observable<DaffCustomer>
  changePassword(
    oldPassword: string
    newPassword: string
  ): Observable<void>
  get(): Observable<DaffCustomer>
  update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>
}

() Methods

changeEmail
Observable<DaffCustomer>

Change the currently logged-in customer's email.

Parameters
Parameteremail: string
Description
Parameterpassword: string
Description
changePassword
Observable<void>

Change the currently logged-in customer's password.

Parameters
ParameteroldPassword: string
Description
ParameternewPassword: string
Description
get
Observable<DaffCustomer>

Get the currently logged-in customer.

update
Observable<DaffCustomer>

Update the currently logged-in customer.

Parameters
Parametercustomer: Partial<DaffCustomer>
Description