File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 44
55   var  scope ,  compile ; 
66
7+    describe ( 'angularValidator with dotted name' ,  function  ( )  { 
8+      var  htmlForm ,  element ,  linkIt ; 
9+ 
10+      beforeEach ( inject ( function  ( $rootScope ,  $compile )  { 
11+        scope  =  $rootScope . $new ( ) ; 
12+        scope . object  =  { } ; 
13+ 
14+        htmlForm  =  angular . element ( 
15+            '<form name="object.form" angular-validator>'  + 
16+            '<input ng-model="model.firstName" validate-on="dirty" name="firstName" type="text" required/>'  + 
17+            '</form>' 
18+        ) ; 
19+ 
20+        linkIt  =  function  ( )  { 
21+          element  =  $compile ( htmlForm ) ( scope ) ; 
22+          scope . $digest ( ) ; 
23+        } ; 
24+      } ) ) ; 
25+ 
26+      it ( 'should not throw an error during linking' ,  function  ( )  { 
27+        expect ( linkIt ) . not . toThrow ( ) ; 
28+      } ) ; 
29+ 
30+      it ( 'should correctly parse the dotted form name, evidenced by what\'s on scope' ,  function  ( )  { 
31+        linkIt ( ) ; 
32+        expect ( scope . object . form ) . toBeDefined ( ) ; 
33+      } ) ; 
34+    } ) ; 
35+    
736  describe ( 'angularValidator without form invalid message' ,  function  ( )  { 
837   beforeEach ( inject ( function ( $rootScope ,  $compile )  { 
938     scope  =  $rootScope . $new ( ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments