@@ -192,15 +192,15 @@ describe('Service: $cordovaGoogleAnalytics', function() {
192192 } ) ;
193193
194194 $cordovaGoogleAnalytics
195- . addCustomDimension ( 'dimension1' , 'Level 1' )
195+ . addCustomDimension ( 1 , 'Level 1' )
196196 . then ( function ( response ) {
197197 result = 'success' ;
198198 } ) ;
199199
200200 $rootScope . $digest ( ) ;
201201
202202 expect ( result ) . toBe ( 'success' ) ;
203- expect ( $window . analytics . addCustomDimension . calls . argsFor ( 0 ) [ 0 ] ) . toBe ( 'dimension1' ) ;
203+ expect ( $window . analytics . addCustomDimension . calls . argsFor ( 0 ) [ 0 ] ) . toBe ( 1 ) ;
204204 expect ( $window . analytics . addCustomDimension . calls . argsFor ( 0 ) [ 1 ] ) . toBe ( 'Level 1' ) ;
205205 } ) ;
206206
@@ -210,7 +210,7 @@ describe('Service: $cordovaGoogleAnalytics', function() {
210210
211211 spyOn ( $window . analytics , 'addCustomDimension' )
212212 . and . callFake ( function ( key , value , successCb , errorCb ) {
213- errorCb ( 'Expected one non-empty string argument ' ) ;
213+ errorCb ( 'Parameter "key" must be an integer. ' ) ;
214214 } ) ;
215215
216216 $cordovaGoogleAnalytics . addCustomDimension ( )
@@ -220,7 +220,7 @@ describe('Service: $cordovaGoogleAnalytics', function() {
220220
221221 $rootScope . $digest ( ) ;
222222
223- expect ( result ) . toBe ( 'Expected one non-empty string argument ' ) ;
223+ expect ( result ) . toBe ( 'Parameter "key" must be an integer. ' ) ;
224224 } ) ;
225225
226226 it ( 'should call $window\'s analytics.trackEvent method' , function ( ) {
0 commit comments