From 38385dbfa615c56ba01db214cb610e2804cd92b8 Mon Sep 17 00:00:00 2001 From: Sandro Castillo Date: Wed, 17 Mar 2021 14:30:57 -0500 Subject: [PATCH] feat: TT-26 test in create customer --- .../components/create-customer/create-customer.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts b/src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts index df28e9d44..8fa89d51f 100644 --- a/src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts +++ b/src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts @@ -140,4 +140,13 @@ describe('CreateCustomerComponent', () => { expect(component.changeValueAreTabsActives.emit).toHaveBeenCalledWith(component.areTabsActive); }); + it('if it detects changes in customer information, it should issue a true', () => { + component.haveChanges = true; + spyOn(component.isHaveChanges, 'emit'); + + component.onSearchChanges('changes text'); + + expect(component.haveChanges).toBe(true); + expect(component.isHaveChanges.emit).toHaveBeenCalledWith(component.haveChanges); + }); });