Skip to content

Commit dd5446f

Browse files
committed
fix: #89 change path of Customer model in imports
1 parent 4e1bc8f commit dd5446f

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MockStore, provideMockStore } from '@ngrx/store/testing';
55
import { CreateCustomerComponent } from './create-customer';
66
import { CustomerState, CreateCustomer } from 'src/app/modules/customer-management/store';
77
import { LoadCustomers } from './../../../../store/customer-management.actions';
8-
import * as models from 'src/app/modules/shared/models/index';
8+
import { Customer } from 'src/app/modules/shared/models';
99

1010
describe('CreateCustomerComponent', () => {
1111
let component: CreateCustomerComponent;
@@ -19,7 +19,7 @@ describe('CreateCustomerComponent', () => {
1919
customerIdToEdit: '',
2020
};
2121

22-
const customerData: models.Customer = {
22+
const customerData: Customer = {
2323
name: 'aa',
2424
description: 'bb',
2525
tenant_id: 'cc',

src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Store, select } from '@ngrx/store';
44

55
import { Subscription } from 'rxjs';
66
import { getStatusMessage, getCustomerById } from './../../../../store/customer-management.selectors';
7-
import { Customer } from 'src/app/modules/shared/models/index';
7+
import { Customer } from 'src/app/modules/shared/models';
88
import {
99
CustomerState,
1010
CreateCustomer,

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ 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]]);
52-
});
50+
service.deleteCustomer(customer[0].id).subscribe();
5351
const getCustomerRequest = httpMock.expectOne(url);
5452

5553
expect(getCustomerRequest.request.method).toBe('DELETE');

src/app/modules/customer-management/store/customer-management.reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CustomerManagementActions, CustomerManagementActionTypes } from './customer-management.actions';
2-
import { Customer } from '../../shared/models/index';
2+
import { Customer } from 'src/app/modules/shared/models';
33

44
export interface CustomerState {
55
data: Customer[];

0 commit comments

Comments
 (0)