This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit 11b3a8375c7974d3f690236654993861072fbc06 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Thu Aug 14 14:03:09 2014 +0200 fix test --- .../src/test/unit/pollControllersTest.js | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pollen-ui-angular/src/test/unit/pollControllersTest.js b/pollen-ui-angular/src/test/unit/pollControllersTest.js index a18a26e..22608b0 100644 --- a/pollen-ui-angular/src/test/unit/pollControllersTest.js +++ b/pollen-ui-angular/src/test/unit/pollControllersTest.js @@ -11,7 +11,6 @@ describe('Global poll controller', function () { })); var $scope = {}; - var $route; var ctrl = null; it('should load PollCtrl', function () { expect(ctrl).toBeDefined(); @@ -25,7 +24,7 @@ describe('Global poll controller', function () { expect($scope.globalVariables.dateFormat).toBeDefined(); expect($scope.globalVariables.timeFormat).not.toBeNull(); - expect($scope.globalVariables.timeFormat).toBeDefined; + expect($scope.globalVariables.timeFormat).toBeDefined(); expect($scope.globalVariables.dateTimeFormat).not.toBeNull(); expect($scope.globalVariables.dateTimeFormat).toBeDefined(); @@ -79,12 +78,12 @@ describe('Global poll controller', function () { expect(valueOf1).toEqual(1.0); var valueOf0 = $scope.getVoteValue(0.0); - expect($scope.getVoteValue(0.0)).toEqual(0.0); + expect(valueOf0).toEqual(0.0); var valueOfTrue = $scope.getVoteValue(true); expect(valueOfTrue).toEqual(1.0); - var valueOfFalse = $scope.getVoteValue(false) + var valueOfFalse = $scope.getVoteValue(false); expect(valueOfFalse).toEqual(0.0); }); @@ -153,7 +152,7 @@ describe('Global poll controller', function () { makeChoice = {choiceType:'DATE', choiceValue: "1405461600000"}; receiveChoice = $scope.postReceiveChoice(makeChoice); - expect(receiveChoice.choiceValue).toEqual(date);; + expect(receiveChoice.choiceValue).toEqual(date); expect(receiveChoice.choiceType).toEqual('DATE'); }); @@ -198,7 +197,7 @@ describe('Admin poll controller', function () { it('should init list of voterList group', function() { expect($scope.data.voterList).toBeDefined(); expect($scope.data.voterList.length).toBeGreaterThan(-1); - }) + }); it('should add a new group of voterList', function () { $scope.addGroup(); @@ -217,7 +216,7 @@ describe('Admin poll controller', function () { $scope.addGroup(); var voterList = $scope.data.voterList[0]; - expect(voterList.group.name).toBeDefined; + expect(voterList.group.name).toBeDefined(); expect(voterList.group.weight).toEqual(1.0); }); @@ -279,7 +278,6 @@ describe('Create poll Controller', function () { }); it('should load base of poll', function () { - expect($scope.data.poll).toBeDefined(); expect($scope.data.choices).toBeDefined(); expect($scope.data.vote).toBeDefined(); expect($scope.data.vote.choices).toBeDefined(); @@ -316,29 +314,29 @@ describe('Edit poll controller', function () { isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeTruthy(); - member = {name:''} + member = {name:''}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeTruthy(); - member = {email:''} + member = {email:''}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeTruthy(); - member = {name:'', email:''} + member = {name:'', email:''}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeTruthy(); // is not empty - member = {name:'memberName'} + member = {name:'memberName'}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeFalsy(); - member = {email:'member@pollen.org'} + member = {email:'member@pollen.org'}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeFalsy(); - member = {name:'memberName', email:'member@pollen.org'} + member = {name:'memberName', email:'member@pollen.org'}; isEmpty = $scope.memberIsEmpty(member); expect(isEmpty).toBeFalsy(); }); @@ -352,7 +350,10 @@ describe('Vote poll controller', function () { beforeEach(inject(function($controller) { $controller('PollCtrl', {$scope: $scope}); ctrl = $controller('PollVoteCtrl', {$scope:$scope}); - })); + + // not limited number of choice (default) + $scope.data.poll = {maxChoiceNumber:0}; +})); var ctrl = null; var $scope = {}; @@ -494,4 +495,4 @@ describe('List of poll controller', function () { it('should load PollListCtrl', function() { expect(ctrl).toBeDefined(); }); -}) \ No newline at end of file +}); \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.