mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Added test for challenge deletion.
This commit is contained in:
parent
13415ecf03
commit
8c562e8e18
1 changed files with 8 additions and 2 deletions
|
|
@ -499,8 +499,14 @@ describe "API", ->
|
||||||
cb()
|
cb()
|
||||||
(cb) ->
|
(cb) ->
|
||||||
User.findById _id, cb
|
User.findById _id, cb
|
||||||
], (err, result) ->
|
], (err, user) ->
|
||||||
expect(result.balance).to.be 5.5
|
expect(user.balance).to.be 5.5
|
||||||
|
done()
|
||||||
|
|
||||||
|
it "User deletes a challenge with prize and gets refund", (done) ->
|
||||||
|
request.del(baseURL + "/challenges/" + body._id).end (res) ->
|
||||||
|
User.findById user._id, (err, user) ->
|
||||||
|
expect(user.balance).to.be 8
|
||||||
done()
|
done()
|
||||||
|
|
||||||
###*
|
###*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue