Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 1 | /// <reference path="../../../../typings/index.d.ts" /> |
| 2 | |
| 3 | import * as angular from 'angular'; |
| 4 | import 'angular-mocks'; |
| 5 | import {xosFooter} from './footer'; |
| 6 | import {StyleConfig} from '../../config/style.config'; |
| 7 | |
| 8 | describe('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 | }); |