Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: #89 change path of Customer model in imports
  • Loading branch information
daros10 committed Apr 21, 2020
commit dd5446f115760f7799e347346a6bd43cea821963
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { CreateCustomerComponent } from './create-customer';
import { CustomerState, CreateCustomer } from 'src/app/modules/customer-management/store';
import { LoadCustomers } from './../../../../store/customer-management.actions';
import * as models from 'src/app/modules/shared/models/index';
import { Customer } from 'src/app/modules/shared/models';

describe('CreateCustomerComponent', () => {
let component: CreateCustomerComponent;
Expand All @@ -19,7 +19,7 @@ describe('CreateCustomerComponent', () => {
customerIdToEdit: '',
};

const customerData: models.Customer = {
const customerData: Customer = {
name: 'aa',
description: 'bb',
tenant_id: 'cc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Store, select } from '@ngrx/store';

import { Subscription } from 'rxjs';
import { getStatusMessage, getCustomerById } from './../../../../store/customer-management.selectors';
import { Customer } from 'src/app/modules/shared/models/index';
import { Customer } from 'src/app/modules/shared/models';
import {
CustomerState,
CreateCustomer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ 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].id).subscribe();
const getCustomerRequest = httpMock.expectOne(url);

expect(getCustomerRequest.request.method).toBe('DELETE');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CustomerManagementActions, CustomerManagementActionTypes } from './customer-management.actions';
import { Customer } from '../../shared/models/index';
import { Customer } from 'src/app/modules/shared/models';

export interface CustomerState {
data: Customer[];
Expand Down