mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Combined both tests because I can't figure out how to pass challenge._id to next test
This commit is contained in:
parent
fef2c834c9
commit
32bcec013f
1 changed files with 4 additions and 8 deletions
|
|
@ -479,7 +479,7 @@ describe "API", ->
|
|||
cb()
|
||||
], done
|
||||
|
||||
it "User creates a challenge with prize", (done) ->
|
||||
it "User creates a challenge with prize, deletes it, gets refund", (done) ->
|
||||
User.findByIdAndUpdate _id,
|
||||
$set:
|
||||
"balance": 8
|
||||
|
|
@ -503,15 +503,11 @@ describe "API", ->
|
|||
_user = results[0]
|
||||
challenge = results[1]
|
||||
expect(_user.balance).to.be 5.5
|
||||
request.del(baseURL + "/challenges/" + challenge._id).end (res) ->
|
||||
User.findById _id, (err, user) ->
|
||||
expect(user.balance).to.be 8
|
||||
done()
|
||||
|
||||
it "User deletes a challenge with prize and gets refund", (done) ->
|
||||
itThis = this
|
||||
request.del(baseURL + "/challenges/" + challenge._id).end (res) ->
|
||||
User.findById _id, (err, user) ->
|
||||
expect(user.balance).to.be 8
|
||||
done()
|
||||
|
||||
###*
|
||||
QUESTS
|
||||
###
|
||||
|
|
|
|||
Loading…
Reference in a new issue