Skip to content

Commit 0a5ff9a

Browse files
committed
fix: #89 use key for get id in test
1 parent 4e1bc8f commit 0a5ff9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/modules/customer-management/services/customer.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ describe('CustomerService', () => {
4747
];
4848
const key = 'id';
4949
const url = `${service.baseUrl}/1`;
50-
service.deleteCustomer(customer[0].id).subscribe((customerResponse) => {
51-
expect(customerResponse.filter((customers) => customers[key] !== customers[0].id)).toEqual([customer[1]]);
50+
service.deleteCustomer(customer[0][key]).subscribe((customerResponse) => {
51+
expect(customerResponse.filter((customers) => customers[key] !== customers[0][key])).toEqual([customer[1]]);
5252
});
5353
const getCustomerRequest = httpMock.expectOne(url);
5454

0 commit comments

Comments
 (0)