From 22a81fe82cfc61ebe19b63593d40ea1f667bf005 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 6 Jul 2014 14:20:48 -0600 Subject: [PATCH] test(list): use timeout.flush() --- js/angular/controller/sideMenuController.js | 1 + test/html/sideMenu.html | 2 +- test/unit/angular/directive/list.unit.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/angular/controller/sideMenuController.js b/js/angular/controller/sideMenuController.js index 9e4bdfc80d..160266a7d1 100644 --- a/js/angular/controller/sideMenuController.js +++ b/js/angular/controller/sideMenuController.js @@ -24,6 +24,7 @@ function($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform) { }; this.dragThreshold = 25; + this.dragOnlyEdge = false; this.edgeDragThreshold = function(value) { if (arguments.length) { if (angular.isNumber(value) && value > 0) { diff --git a/test/html/sideMenu.html b/test/html/sideMenu.html index 4e6dab7a75..e02c99a61b 100644 --- a/test/html/sideMenu.html +++ b/test/html/sideMenu.html @@ -13,7 +13,7 @@ - +

Slide me

diff --git a/test/unit/angular/directive/list.unit.js b/test/unit/angular/directive/list.unit.js index 7b4583ef51..3061ea32a7 100644 --- a/test/unit/angular/directive/list.unit.js +++ b/test/unit/angular/directive/list.unit.js @@ -44,7 +44,7 @@ describe('ionList directive', function() { el.scope().$onReorder = jasmine.createSpy('$onReorder'); options.onReorder(el, 2, 3); expect(el.scope().$onReorder).not.toHaveBeenCalled(); - el.scope().$apply(); + flush(); expect(el.scope().$onReorder).toHaveBeenCalledWith(2,3); });