UNPKG

gaf-mobile

Version:

GAF mobile Web site

25 lines (18 loc) 624 B
'use strict'; describe('Directive: flMobileBackground', function() { var element, $scope; beforeEach(module('gafMobileApp')); beforeEach(inject(function($rootScope, $compile) { $scope = $rootScope.$new(); var template = angular.element('<div fl-mobile-background="bgimage"' + '</div>'); element = $compile(template)($scope); })); describe('when directive loads', function() { it('should attach background image to element', function() { // Use PhantomJS base url expect(element.css('background-image')) .toBe('url(http://localhost:9876/bgimage)'); }); }); });