From 0a5ff9a3a01b2842be7262ab5062507ff8a3d08a Mon Sep 17 00:00:00 2001 From: daros10 Date: Tue, 21 Apr 2020 16:18:55 -0500 Subject: [PATCH] fix: #89 use key for get id in test --- .../customer-management/services/customer.service.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/customer-management/services/customer.service.spec.ts b/src/app/modules/customer-management/services/customer.service.spec.ts index 176b4d7e2..2dffc8565 100644 --- a/src/app/modules/customer-management/services/customer.service.spec.ts +++ b/src/app/modules/customer-management/services/customer.service.spec.ts @@ -47,8 +47,8 @@ describe('CustomerService', () => { ]; const key = 'id'; const url = `${service.baseUrl}/1`; - service.deleteCustomer(customer[0].id).subscribe((customerResponse) => { - expect(customerResponse.filter((customers) => customers[key] !== customers[0].id)).toEqual([customer[1]]); + service.deleteCustomer(customer[0][key]).subscribe((customerResponse) => { + expect(customerResponse.filter((customers) => customers[key] !== customers[0][key])).toEqual([customer[1]]); }); const getCustomerRequest = httpMock.expectOne(url);