Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge leave route and tests #6591

Merged
merged 2 commits into from
Jan 27, 2016

Conversation

KristianTashkov
Copy link
Contributor

Challenge leave route for #6509
As with join I opted with testing that the main functionalities of unlinkChallengeTasks are called, and the more detailed ones with be left for unit tests.

});

let tasks = await leavingUser.get('/tasks/user');
let testTask = _.find(tasks, (task) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here would you mind to check that task.challenge has been set to an empty object? (it's possible the api doesn't return task.challenge at all if it's an empty object but it's okay, in that case just test that task.challenge doesn't exist)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm stupid sorry :) I had to scroll down a little more and would have seen that you already tested it :)

@KristianTashkov
Copy link
Contributor Author

@paglias updated, leave route now returns empty object on success.

paglias added a commit that referenced this pull request Jan 27, 2016
@paglias paglias merged commit 1bf4d12 into HabitRPG:api-v3-groups Jan 27, 2016
@paglias
Copy link
Contributor

paglias commented Jan 27, 2016

@KristianTashkov level 4 awarded :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants