@@ -1488,16 +1488,6 @@ describe('$compile', function() {
1488
1488
) ;
1489
1489
1490
1490
1491
- it ( 'should not allow more then one isolate scope creation per element' , inject (
1492
- function ( $rootScope , $compile ) {
1493
- expect ( function ( ) {
1494
- $compile ( '<div class="iscope-a; iscope-b"></div>' ) ;
1495
- } ) . toThrowMinErr ( '$compile' , 'multidir' , 'Multiple directives [iscopeA, iscopeB] asking for isolated scope on: ' +
1496
- '<div class="iscope-a; iscope-b ng-isolate-scope ng-scope">' ) ;
1497
- } )
1498
- ) ;
1499
-
1500
-
1501
1491
it ( 'should create new scope even at the root of the template' , inject (
1502
1492
function ( $rootScope , $compile , log ) {
1503
1493
element = $compile ( '<div scope-a></div>' ) ( $rootScope ) ;
@@ -1824,24 +1814,6 @@ describe('$compile', function() {
1824
1814
} ) ;
1825
1815
} ) ;
1826
1816
1827
- it ( 'should allow setting of attributes' , function ( ) {
1828
- module ( function ( ) {
1829
- directive ( {
1830
- setter : valueFn ( function ( scope , element , attr ) {
1831
- attr . $set ( 'name' , 'abc' ) ;
1832
- attr . $set ( 'disabled' , true ) ;
1833
- expect ( attr . name ) . toBe ( 'abc' ) ;
1834
- expect ( attr . disabled ) . toBe ( true ) ;
1835
- } )
1836
- } ) ;
1837
- } ) ;
1838
- inject ( function ( $rootScope , $compile ) {
1839
- element = $compile ( '<div setter></div>' ) ( $rootScope ) ;
1840
- expect ( element . attr ( 'name' ) ) . toEqual ( 'abc' ) ;
1841
- expect ( element . attr ( 'disabled' ) ) . toEqual ( 'disabled' ) ;
1842
- } ) ;
1843
- } ) ;
1844
-
1845
1817
1846
1818
it ( 'should create new instance of attr for each template stamping' , function ( ) {
1847
1819
module ( function ( $provide ) {
@@ -2055,32 +2027,15 @@ describe('$compile', function() {
2055
2027
2056
2028
$rootScope . name = 'misko' ;
2057
2029
$rootScope . $apply ( ) ;
2058
- expect ( componentScope . ref ) . toBe ( $rootScope . name ) ;
2059
- expect ( componentScope . refAlias ) . toBe ( $rootScope . name ) ;
2060
-
2061
- $rootScope . name = { } ;
2062
- $rootScope . $apply ( ) ;
2063
- expect ( componentScope . ref ) . toBe ( $rootScope . name ) ;
2064
- expect ( componentScope . refAlias ) . toBe ( $rootScope . name ) ;
2065
- } ) ) ;
2066
-
2067
-
2068
- it ( 'should update local when origin changes' , inject ( function ( ) {
2069
- compile ( '<div><span my-component ref="name">' ) ;
2070
- expect ( componentScope . ref ) . toBe ( undefined ) ;
2071
- expect ( componentScope . refAlias ) . toBe ( componentScope . ref ) ;
2072
2030
2073
- componentScope . ref = 'misko' ;
2074
- $rootScope . $apply ( ) ;
2075
2031
expect ( $rootScope . name ) . toBe ( 'misko' ) ;
2076
2032
expect ( componentScope . ref ) . toBe ( 'misko' ) ;
2077
- expect ( $rootScope . name ) . toBe ( componentScope . ref ) ;
2078
- expect ( componentScope . refAlias ) . toBe ( componentScope . ref ) ;
2033
+ expect ( componentScope . refAlias ) . toBe ( 'misko' ) ;
2079
2034
2080
- componentScope . name = { } ;
2035
+ $rootScope . name = { } ;
2081
2036
$rootScope . $apply ( ) ;
2082
- expect ( $rootScope . name ) . toBe ( componentScope . ref ) ;
2083
- expect ( componentScope . refAlias ) . toBe ( componentScope . ref ) ;
2037
+ expect ( componentScope . ref ) . toBe ( $rootScope . name ) ;
2038
+ expect ( componentScope . refAlias ) . toBe ( $rootScope . name ) ;
2084
2039
} ) ) ;
2085
2040
2086
2041
@@ -3379,7 +3334,7 @@ describe('$compile', function() {
3379
3334
} ) ) ;
3380
3335
3381
3336
3382
- it ( 'should group on nested groups' , inject ( function ( $compile , $rootScope ) {
3337
+ it ( 'should group on nested groups of same directive ' , inject ( function ( $compile , $rootScope ) {
3383
3338
$rootScope . show = false ;
3384
3339
element = $compile (
3385
3340
'<div></div>' +
@@ -3427,7 +3382,7 @@ describe('$compile', function() {
3427
3382
} ) ;
3428
3383
3429
3384
3430
- it ( 'should throw error if unterminated' , function ( ) {
3385
+ it ( 'should throw error if unterminated (containing termination as a child) ' , function ( ) {
3431
3386
module ( function ( $compileProvider ) {
3432
3387
$compileProvider . directive ( 'foo' , function ( ) {
3433
3388
return {
0 commit comments