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
committed by Tobias Bosch
parent 1ee9b4ef5e
commit 5847fc48e7

View File

@@ -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);
}
);