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.
This commit is contained in:
Peter Bacon Darwin
2014-09-03 14:56:49 +01:00
parent 300bffc4fe
commit 821da26e18

View File

@@ -1239,7 +1239,7 @@ describe('$location', function() {
initBrowser(),
initLocation(),
function($browser) {
browserTrigger(link, 'click', ['ctrl']);
browserTrigger(link, 'click', { keys: ['ctrl'] });
expectNoRewrite($browser);
}
);
@@ -1252,7 +1252,7 @@ describe('$location', function() {
initBrowser(),
initLocation(),
function($browser) {
browserTrigger(link, 'click', ['meta']);
browserTrigger(link, 'click', { keys: ['meta'] });
expectNoRewrite($browser);
}
);