3 /* jasmine specs for directives go here */
5 describe('directives', function() {
6 beforeEach(module('myApp.directives'));
8 describe('app-version', function() {
9 it('should print current version', function() {
10 module(function($provide) {
11 $provide.value('version', 'TEST_VER');
13 inject(function($compile, $rootScope) {
14 var element = $compile('<span app-version></span>')($rootScope);
15 expect(element.text()).toEqual('TEST_VER');
20 describe('my-input', function() {
21 it('div+label+input', function() {
22 inject(function($compile, $rootScope) {
23 var element = $compile('<div><input class="my-input" ng-model="m" placeholder="p"></input></div>')($rootScope);
24 // dump(element.html());
25 // console.log( element );
26 expect(element.html()).toMatch(/div.*label.*input.*div/i);