mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-16 18:29:57 +08:00
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:
committed by
Tobias Bosch
parent
1ee9b4ef5e
commit
5847fc48e7
@@ -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);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user