From 26b3ab1f9a32d7a3f697c25bb7c278e940d87ee5 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Fri, 24 Jul 2015 10:07:41 -0500 Subject: [PATCH] Add pending tests --- test/spec/controllers/challengesCtrlSpec.js | 64 +++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/test/spec/controllers/challengesCtrlSpec.js b/test/spec/controllers/challengesCtrlSpec.js index f3bc73ae7c..83f555af19 100644 --- a/test/spec/controllers/challengesCtrlSpec.js +++ b/test/spec/controllers/challengesCtrlSpec.js @@ -175,6 +175,49 @@ describe('Challenges Controller', function() { }); }); + describe('selectAll', function() { + it('selects all groups'); + }); + + describe('selectNone', function() { + it('selects no groups'); + }); + + describe("save challenge", function() { + }); + + describe('create', function() { + it('creates new challenge with group that user has selected in filter'); + + it('defaults to tavern if no group can be set as default'); + + it('calculates maxPrize'); + + it('sets newChallenge to a blank challenge'); + + context('tavern challenge', function() { + it('sets isTavernChallengeAndUserCannotProvidePrize to false if user has no gems'); + it('sets isTavernChallengeAndUserCannotProvidePrize to true if user has at least one gem'); + }); + + context('non-tavern challenge', function() { + it('sets isTavernChallengeAndUserCannotProvidePrize to false'); + }); + }); + + describe('discard', function() { + it('sets new challenge to null'); + }); + + describe('edit', function() { + it('transitions to edit page'); + }); + + describe('addTask', function() { + it('adds default task to array'); + it('removes text from new task input box'); + }); + describe('editTask', function() { it('is Tasks.editTask', function() { inject(function(Tasks) { @@ -183,6 +226,27 @@ describe('Challenges Controller', function() { }); }); + describe('removeTask', function() { + it('asks user to confirm deletion'); + it('removes task from list'); + }); + + describe('saveTask', function() { + it('sets task._editing to false'); + }); + + describe('join', function() { + it('calls challenge join endpoint'); + }); + + describe('clickLeave', function() { + it('opens a popover to confirm'); + }); + + describe('leave', function() { + it('(@TODO: write tests)'); + }); + describe('clone', function() { var challengeToClone = {