@@ -104,61 +104,3 @@ describe('position elements', function () {
104
104
} ) ;
105
105
} ) ;
106
106
} ) ;
107
-
108
- /* Deprecation tests below */
109
-
110
- describe ( 'position deprecation' , function ( ) {
111
- var TargetElMock = function ( width , height ) {
112
- this . width = width ;
113
- this . height = height ;
114
-
115
- this . prop = function ( propName ) {
116
- return propName === 'offsetWidth' ? width : height ;
117
- } ;
118
- } ;
119
- beforeEach ( module ( 'ui.bootstrap.position' ) ) ;
120
-
121
- it ( 'should suppress warning' , function ( ) {
122
- module ( function ( $provide ) {
123
- $provide . value ( '$positionSuppressWarning' , true ) ;
124
- } ) ;
125
-
126
- inject ( function ( $log , $position ) {
127
- spyOn ( $log , 'warn' ) ;
128
- //mock position info normally queried from the DOM
129
- $position . position = function ( ) {
130
- return {
131
- width : 20 ,
132
- height : 20 ,
133
- top : 100 ,
134
- left : 100
135
- } ;
136
- } ;
137
-
138
- $position . positionElements ( { } , new TargetElMock ( 10 , 10 ) , 'other' ) ;
139
-
140
- expect ( $log . warn . calls . count ( ) ) . toBe ( 0 ) ;
141
- } ) ;
142
- } ) ;
143
-
144
- it ( 'should give warning by default' , inject ( function ( $log ) {
145
- spyOn ( $log , 'warn' ) ;
146
-
147
- inject ( function ( $position ) {
148
- //mock position info normally queried from the DOM
149
- $position . position = function ( ) {
150
- return {
151
- width : 20 ,
152
- height : 20 ,
153
- top : 100 ,
154
- left : 100
155
- } ;
156
- } ;
157
-
158
- $position . positionElements ( { } , new TargetElMock ( 10 , 10 ) , 'other' ) ;
159
-
160
- expect ( $log . warn . calls . count ( ) ) . toBe ( 1 ) ;
161
- expect ( $log . warn . calls . argsFor ( 0 ) ) . toEqual ( [ '$position is now deprecated. Use $uibPosition instead.' ] ) ;
162
- } ) ;
163
- } ) ) ;
164
- } ) ;
0 commit comments