refactor(test): adapted the new thermograph front unit test to expect thermograph data to be defined
This commit is contained in:
parent
e3942c0bb9
commit
5be2eb974f
|
@ -79,8 +79,24 @@ describe('Ticket', () => {
|
|||
});
|
||||
|
||||
describe('onNewThermographAccept()', () => {
|
||||
it('should set the created thermograph id on to the controller for the autocomplete to use it', () => {
|
||||
const response = {id: 'the created id'};
|
||||
it('should set the created thermograph data on to the controller for the autocomplete to use it', () => {
|
||||
const id = 'the created id';
|
||||
const warehouseId = 1;
|
||||
const temperatureId = 'cool';
|
||||
const model = 'my model';
|
||||
|
||||
controller.newThermograph = {
|
||||
thermographId: id,
|
||||
warehouseId: warehouseId,
|
||||
temperatureFk: temperatureId,
|
||||
model: model
|
||||
};
|
||||
const response = {
|
||||
id: id,
|
||||
warehouseId: warehouseId,
|
||||
temperatureFk: temperatureId,
|
||||
model: model
|
||||
};
|
||||
$httpBackend.when('POST', `Thermographs/createThermograph`).respond(response);
|
||||
controller.onNewThermographAccept();
|
||||
$httpBackend.flush();
|
||||
|
|
Loading…
Reference in New Issue