mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Organize challenge controllers specs
This commit is contained in:
@@ -33,6 +33,7 @@ describe('Challenges Controller', function() {
|
||||
});
|
||||
});
|
||||
|
||||
context('filtering', function() {
|
||||
describe('filterChallenges', function() {
|
||||
var ownMem, ownNotMem, notOwnMem, notOwnNotMem;
|
||||
|
||||
@@ -191,6 +192,9 @@ describe('Challenges Controller', function() {
|
||||
describe('selectNone', function() {
|
||||
it('selects no groups');
|
||||
});
|
||||
});
|
||||
|
||||
context('task manipulation', function() {
|
||||
|
||||
describe('shouldShow', function() {
|
||||
it('overrides task controller function by always returning true', function() {
|
||||
@@ -198,6 +202,34 @@ describe('Challenges Controller', function() {
|
||||
});
|
||||
});
|
||||
|
||||
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) {
|
||||
expect(scope.editTask).to.eql(Tasks.editTask);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('removeTask', function() {
|
||||
it('asks user to confirm deletion');
|
||||
it('removes task from list');
|
||||
});
|
||||
|
||||
describe('saveTask', function() {
|
||||
it('sets task._editing to false');
|
||||
});
|
||||
});
|
||||
|
||||
context('challenge owner interactions', function() {
|
||||
describe("save challenge", function() {
|
||||
var alert;
|
||||
|
||||
@@ -412,44 +444,6 @@ describe('Challenges Controller', 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) {
|
||||
expect(scope.editTask).to.eql(Tasks.editTask);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
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 = {
|
||||
@@ -526,3 +520,18 @@ describe('Challenges Controller', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('User interactions', function() {
|
||||
describe('join', function() {
|
||||
it('calls challenge join endpoint');
|
||||
});
|
||||
|
||||
describe('clickLeave', function() {
|
||||
it('opens a popover to confirm');
|
||||
});
|
||||
|
||||
describe('leave', function() {
|
||||
it('(@TODO: write tests)');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user