mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Removed a function call in hopes of correct updation of challenge variable
This commit is contained in:
parent
079df668ce
commit
168d72fb0a
1 changed files with 18 additions and 20 deletions
|
|
@ -485,26 +485,24 @@ describe "API", ->
|
|||
"balance": 8
|
||||
, (err, user) ->
|
||||
expect(err).to.not.be.ok()
|
||||
(cb) ->
|
||||
request.post(baseURL + "/challenges").send(
|
||||
group: group._id
|
||||
dailys: []
|
||||
todos: []
|
||||
rewards: []
|
||||
habits: []
|
||||
prize: 10
|
||||
).end (res) ->
|
||||
expect(res.body.prize).to.be 10
|
||||
async.parallel [
|
||||
(cb) ->
|
||||
User.findById _id, cb
|
||||
(cb) ->
|
||||
Challenge.findById res.body._id, cb
|
||||
], (err, results) ->
|
||||
_user = results[0]
|
||||
challenge = results[1]
|
||||
expect(_user.balance).to.be 5.5
|
||||
cb()
|
||||
request.post(baseURL + "/challenges").send(
|
||||
group: group._id
|
||||
dailys: []
|
||||
todos: []
|
||||
rewards: []
|
||||
habits: []
|
||||
prize: 10
|
||||
).end (res) ->
|
||||
expect(res.body.prize).to.be 10
|
||||
async.parallel [
|
||||
(cb) ->
|
||||
User.findById _id, cb
|
||||
(cb) ->
|
||||
Challenge.findById res.body._id, cb
|
||||
], (err, results) ->
|
||||
_user = results[0]
|
||||
challenge = results[1]
|
||||
expect(_user.balance).to.be 5.5
|
||||
done()
|
||||
|
||||
it "User deletes a challenge with prize and gets refund", (done) ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue