mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
* - updates a group task - approval is required - updates a group task with checklist * add expect to test the new checklist length * - moves tasks to a specified position out of length * remove unused line * website getter tasks tests * re-add sanitizeUserChallengeTask * change config.json.example variable to be a string not a boolean * fix tests - pick the text / up/down props too * fix test - remove changes on text/up/down - revert sanitize condition - revert sanitization props
20 lines
521 B
JavaScript
20 lines
521 B
JavaScript
import generateStore from 'client/store';
|
|
|
|
describe('canDelete getter', () => {
|
|
it('cannot delete active challenge task', () => {
|
|
const store = generateStore();
|
|
|
|
|
|
const task = {userId: 1, challenge: {id: 2}};
|
|
expect(store.getters['tasks:canDelete'](task)).to.equal(false);
|
|
});
|
|
|
|
it('can delete broken challenge task', () => {
|
|
const store = generateStore();
|
|
|
|
|
|
const task = {userId: 1, challenge: {id: 2, broken: true}};
|
|
expect(store.getters['tasks:canDelete'](task)).to.equal(true);
|
|
});
|
|
});
|