@@ -6,7 +6,7 @@ describe('rating directive', function () {
6
6
$compile = _$compile_ ;
7
7
$rootScope = _$rootScope_ ;
8
8
$rootScope . rate = 3 ;
9
- element = $compile ( '<rating value ="rate"></rating>' ) ( $rootScope ) ;
9
+ element = $compile ( '<rating ng-model ="rate"></rating>' ) ( $rootScope ) ;
10
10
$rootScope . $digest ( ) ;
11
11
} ) ) ;
12
12
@@ -71,22 +71,22 @@ describe('rating directive', function () {
71
71
} ) ;
72
72
73
73
it ( 'shows different number of icons when `max` attribute is set' , function ( ) {
74
- element = $compile ( '<rating value ="rate" max="7"></rating>' ) ( $rootScope ) ;
74
+ element = $compile ( '<rating ng-model ="rate" max="7"></rating>' ) ( $rootScope ) ;
75
75
$rootScope . $digest ( ) ;
76
76
77
77
expect ( getStars ( ) . length ) . toBe ( 7 ) ;
78
78
} ) ;
79
79
80
80
it ( 'shows different number of icons when `max` attribute is from scope variable' , function ( ) {
81
81
$rootScope . max = 15 ;
82
- element = $compile ( '<rating value ="rate" max="max"></rating>' ) ( $rootScope ) ;
82
+ element = $compile ( '<rating ng-model ="rate" max="max"></rating>' ) ( $rootScope ) ;
83
83
$rootScope . $digest ( ) ;
84
84
expect ( getStars ( ) . length ) . toBe ( 15 ) ;
85
85
} ) ;
86
86
87
87
it ( 'handles readonly attribute' , function ( ) {
88
88
$rootScope . isReadonly = true ;
89
- element = $compile ( '<rating value ="rate" readonly="isReadonly"></rating>' ) ( $rootScope ) ;
89
+ element = $compile ( '<rating ng-model ="rate" readonly="isReadonly"></rating>' ) ( $rootScope ) ;
90
90
$rootScope . $digest ( ) ;
91
91
92
92
expect ( getState ( ) ) . toEqual ( [ true , true , true , false , false ] ) ;
@@ -106,7 +106,7 @@ describe('rating directive', function () {
106
106
107
107
it ( 'should fire onHover' , function ( ) {
108
108
$rootScope . hoveringOver = jasmine . createSpy ( 'hoveringOver' ) ;
109
- element = $compile ( '<rating value ="rate" on-hover="hoveringOver(value)"></rating>' ) ( $rootScope ) ;
109
+ element = $compile ( '<rating ng-model ="rate" on-hover="hoveringOver(value)"></rating>' ) ( $rootScope ) ;
110
110
$rootScope . $digest ( ) ;
111
111
112
112
getStar ( 3 ) . trigger ( 'mouseover' ) ;
@@ -116,7 +116,7 @@ describe('rating directive', function () {
116
116
117
117
it ( 'should fire onLeave' , function ( ) {
118
118
$rootScope . leaving = jasmine . createSpy ( 'leaving' ) ;
119
- element = $compile ( '<rating value ="rate" on-leave="leaving()"></rating>' ) ( $rootScope ) ;
119
+ element = $compile ( '<rating ng-model ="rate" on-leave="leaving()"></rating>' ) ( $rootScope ) ;
120
120
$rootScope . $digest ( ) ;
121
121
122
122
element . trigger ( 'mouseleave' ) ;
@@ -128,7 +128,7 @@ describe('rating directive', function () {
128
128
beforeEach ( inject ( function ( ) {
129
129
$rootScope . classOn = 'icon-ok-sign' ;
130
130
$rootScope . classOff = 'icon-ok-circle' ;
131
- element = $compile ( '<rating value ="rate" state-on="classOn" state-off="classOff"></rating>' ) ( $rootScope ) ;
131
+ element = $compile ( '<rating ng-model ="rate" state-on="classOn" state-off="classOff"></rating>' ) ( $rootScope ) ;
132
132
$rootScope . $digest ( ) ;
133
133
} ) ) ;
134
134
@@ -145,7 +145,7 @@ describe('rating directive', function () {
145
145
{ stateOn : 'heart' } ,
146
146
{ stateOff : 'off' }
147
147
] ;
148
- element = $compile ( '<rating value ="rate" rating-states="states"></rating>' ) ( $rootScope ) ;
148
+ element = $compile ( '<rating ng-model ="rate" rating-states="states"></rating>' ) ( $rootScope ) ;
149
149
$rootScope . $digest ( ) ;
150
150
} ) ) ;
151
151
@@ -175,7 +175,7 @@ describe('rating directive', function () {
175
175
ratingConfig . max = 10 ;
176
176
ratingConfig . stateOn = 'on' ;
177
177
ratingConfig . stateOff = 'off' ;
178
- element = $compile ( '<rating value ="rate"></rating>' ) ( $rootScope ) ;
178
+ element = $compile ( '<rating ng-model ="rate"></rating>' ) ( $rootScope ) ;
179
179
$rootScope . $digest ( ) ;
180
180
} ) ) ;
181
181
afterEach ( inject ( function ( ratingConfig ) {
0 commit comments