mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed #360 - dynamic slidebox sizing
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
* see the core Ionic sideMenu controller tests.
|
||||
*/
|
||||
describe('Ionic Angular Slide Box', function() {
|
||||
var el;
|
||||
var el, delegate, timeout;
|
||||
|
||||
beforeEach(module('ionic.ui.slideBox'));
|
||||
beforeEach(module('ionic'));
|
||||
|
||||
beforeEach(inject(function($compile, $rootScope) {
|
||||
beforeEach(inject(function($compile, $rootScope, $timeout, SlideBoxDelegate) {
|
||||
delegate = SlideBoxDelegate;
|
||||
timeout = $timeout;
|
||||
el = $compile('<slide-box>\
|
||||
<slide>\
|
||||
<div class="box blue">\
|
||||
@@ -29,4 +31,13 @@ describe('Ionic Angular Slide Box', function() {
|
||||
var scope = el.scope();
|
||||
expect(scope.slideBox).not.toBe(undefined);
|
||||
});
|
||||
|
||||
it('Should update with delegate', function() {
|
||||
var scope = el.scope();
|
||||
var slideBox = scope.slideBox;
|
||||
spyOn(slideBox, 'setup');
|
||||
delegate.update();
|
||||
timeout.flush();
|
||||
expect(slideBox.setup).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user