Skip to content

Instantly share code, notes, and snippets.

@kristianmandrup
Last active October 18, 2016 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristianmandrup/7aa109aa70c1e4d36f9493924d8a733a to your computer and use it in GitHub Desktop.
Save kristianmandrup/7aa109aa70c1e4d36f9493924d8a733a to your computer and use it in GitHub Desktop.
let testCall = async () => {
return await _.callApi(route + '/rate', 'POST', requests.rate);
}
test('route: components')
.that('POST component rating')
.will('add a rating to the component', async () => {
check.ratingAdded(testCall());
})
.will('NOT add a second rating to the component for the same user', async () => {
check.duplicateUserRatingNotAdded(testCall())
})
.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment