blob: 06c1044990aec788ec3c0fcc01a37ed17c5ebd35 [file] [log] [blame]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08001/// <reference path="../../../../typings/index.d.ts" />
2
3import * as angular from 'angular';
4import 'angular-mocks';
5import {xosFooter} from './footer';
6import {StyleConfig} from '../../config/style.config';
7
8describe('footer component', () => {
9 beforeEach(() => {
10 angular
11 .module('xosFooter', ['app/core/footer/footer.html'])
12 .component('xosFooter', xosFooter);
13 angular.mock.module('xosFooter');
14 });
15
16 it('should render "XOS Team"', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
17 const element = $compile('<xos-footer></xos-footer>')($rootScope);
18 $rootScope.$digest();
19 const footer = element.find('a');
20 expect(footer.html().trim()).toEqual(`${StyleConfig.projectName} Team`);
21 }));
22});