blob: 3f463303cc0447c2afcf16653537a364e201422b [file] [log] [blame]
Matteo Scandoloef969922016-08-11 13:49:12 -07001'use strict';
2
3describe('The ErrorHandler service', () => {
4
5 var ErrorHandler, done;
6
7 beforeEach(module('xos.UITutorial'));
8 beforeEach(module('templates'));
9
10 beforeEach(inject(function (_ErrorHandler_) {
11 // The injector unwraps the underscores (_) from around the parameter names when matching
12 ErrorHandler = _ErrorHandler_;
13 done = jasmine.createSpy('done');
14 }));
15
16 describe('the print method', () => {
17 it('should return an html template', () => {
18 ErrorHandler.print('myError', done);
19 expect(done).toHaveBeenCalledWith(`<span class="error">[ERROR] myError</span>`)
20 });
21 });
22});