mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
Test for tab bar controller
This commit is contained in:
@ -2,8 +2,9 @@ describe('TabBarController', function() {
|
||||
var ctrl;
|
||||
|
||||
beforeEach(function() {
|
||||
var tabEl = $('<div class="tabs"></div>');
|
||||
ctrl = new TabBarController({
|
||||
tabBar: new TabBar()
|
||||
tabBar: new TabBar({ el: tabEl })
|
||||
});
|
||||
})
|
||||
|
||||
@ -53,8 +54,9 @@ describe('TabBarController', function() {
|
||||
});
|
||||
|
||||
it('Should allow cancelling Controller switch', function() {
|
||||
var tabEl = $('<div class="tabs"></div>');
|
||||
ctrl = new TabBarController({
|
||||
tabBar: new TabBar(),
|
||||
tabBar: new TabBar({ el: tabEl }),
|
||||
controllerWillChange: function(Controller) { return false; }
|
||||
});
|
||||
|
||||
@ -70,4 +72,4 @@ describe('TabBarController', function() {
|
||||
expect(ctrl.getSelectedController()).toBe(ctrl.getController(0));
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user