Updated unit test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a50eebfed4
commit
a4f20daf17
|
@ -76,25 +76,25 @@ describe('Client', () => {
|
|||
|
||||
describe('stateColor()', () => {
|
||||
it('should return "success" when the alertLevelCode property is "OK"', () => {
|
||||
const result = controller.stateColor({alertLevelCode: 'OK'});
|
||||
const result = controller.stateColor({ticketState: {code: 'OK'}});
|
||||
|
||||
expect(result).toEqual('success');
|
||||
});
|
||||
|
||||
it('should return "notice" when the alertLevelCode property is "FREE"', () => {
|
||||
const result = controller.stateColor({alertLevelCode: 'FREE'});
|
||||
const result = controller.stateColor({ticketState: {code: 'FREE'}});
|
||||
|
||||
expect(result).toEqual('notice');
|
||||
});
|
||||
|
||||
it('should return "warning" when the alertLevel property is "1', () => {
|
||||
const result = controller.stateColor({alertLevel: 1});
|
||||
const result = controller.stateColor({ticketState: {code: 'PACKING', alertLevel: 1}});
|
||||
|
||||
expect(result).toEqual('warning');
|
||||
});
|
||||
|
||||
it('should return "alert" when the alertLevel property is "0"', () => {
|
||||
const result = controller.stateColor({alertLevel: 0});
|
||||
const result = controller.stateColor({ticketState: {code: 'FIXING', alertLevel: 0}});
|
||||
|
||||
expect(result).toEqual('alert');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue