From 5847fc48e795df90bb3d3b60869004c2fa273526 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 3 Sep 2014 14:56:49 +0100 Subject: [PATCH] test($location): fix use of browserTrigger You must now pass `keys` to the function in a config object. This bug in the test became apparent because in newer browsers, arrays have a function called `keys()` and this was causing browserTrigger to fail. Previously it was quietly passing this test despite being wrong. --- test/ng/locationSpec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index ae95941f..111f1d14 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -1230,7 +1230,7 @@ describe('$location', function() { initBrowser(), initLocation(), function($browser) { - browserTrigger(link, 'click', ['ctrl']); + browserTrigger(link, 'click', { keys: ['ctrl'] }); expectNoRewrite($browser); } ); @@ -1243,7 +1243,7 @@ describe('$location', function() { initBrowser(), initLocation(), function($browser) { - browserTrigger(link, 'click', ['meta']); + browserTrigger(link, 'click', { keys: ['meta'] }); expectNoRewrite($browser); } );