Fixed failing ui unit tests

This commit is contained in:
Michael Abashian 2017-05-19 13:33:40 -04:00
parent 4748f6d2e2
commit 1af972fc39
3 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ describe('Service: QuerySet', () => {
// @todo: improve appsource
// provide api version via package.json config block
$httpBackend
.whenGET('/api')
.whenGET(/^\/api\/?$/)
.respond(200, '');
}));

View File

@ -23,7 +23,7 @@ describe('workflowResultsService', () => {
let ticks = 0;
let ticks_expected = 10;
workflowResultsService.createOneSecondTimer(moment(), function(time) {
workflowResultsService.createOneSecondTimer(moment(), function() {
ticks += 1;
if (ticks >= ticks_expected) {
expect(ticks).toBe(ticks_expected);
@ -36,7 +36,7 @@ describe('workflowResultsService', () => {
$interval.flush(ticks_expected * 1000);
});
});
describe('destroyTimer()', () => {
beforeEach(() => {
$interval.cancel = jasmine.createSpy('cancel');
@ -56,4 +56,4 @@ describe('workflowResultsService', () => {
expect($interval.cancel).toHaveBeenCalledWith(timer);
});
});
});
});

View File

@ -80,8 +80,8 @@ describe('Controller: WorkflowAdd', () => {
ParseTypeChange = _ParseTypeChange_;
ToJSON = _ToJSON_;
httpBackend
.whenGET('/api')
$httpBackend
.whenGET(/^\/api\/?$/)
.respond(200, '');
$httpBackend