This commit is contained in:
parent
56c291a160
commit
3c9fe334c9
|
@ -207,12 +207,12 @@ describe('Ticket', () => {
|
|||
describe('updateConcept()', () => {
|
||||
it('should make a POST query saving sale concept', () => {
|
||||
spyOn(controller.$scope.watcher, 'updateOriginalData');
|
||||
const data = {concept: 'My new weapon'};
|
||||
const data = {newConcept: 'My new weapon'};
|
||||
const sale = sales[0];
|
||||
sale.concept = 'My new weapon';
|
||||
|
||||
$httpBackend.when('PATCH', `/api/Sales/1`, data).respond();
|
||||
$httpBackend.expect('PATCH', `/api/Sales/1`, data).respond();
|
||||
$httpBackend.when('POST', `/api/Sales/1/updateConcept`, data).respond();
|
||||
$httpBackend.expect('POST', `/api/Sales/1/updateConcept`, data).respond();
|
||||
controller.updateConcept(sale);
|
||||
$httpBackend.flush();
|
||||
|
||||
|
|
Loading…
Reference in New Issue