mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(bosses): don't reset progress.up when starting a new quest. We want
to be able to carry over damage from the same day a boss battle begins, even if the dailies were completed before battle-start. Fixes #2168
This commit is contained in:
@@ -280,6 +280,19 @@ describe('API', function () {
|
||||
participating = [],
|
||||
notParticipating = [];
|
||||
|
||||
it("Tallies progress",function(done){
|
||||
request.post(baseURL+'/user/batch-update')
|
||||
.send([
|
||||
{op:'score',params:{direction:'up',id:user.dailys[0].id}},
|
||||
{op:'score',params:{direction:'up',id:user.dailys[1].id}}
|
||||
])
|
||||
.end(function(res){
|
||||
user = res.body;
|
||||
expect(user.party.quest.progress.up).to.be.above(0);
|
||||
done();
|
||||
})
|
||||
});
|
||||
|
||||
it('Invites some members', function (done) {
|
||||
async.waterfall([
|
||||
|
||||
@@ -363,6 +376,25 @@ describe('API', function () {
|
||||
}], done);
|
||||
});
|
||||
|
||||
it('Hurts the boss',function(done){
|
||||
request.post(baseURL+'/user/batch-update')
|
||||
.end(function(res){
|
||||
user = res.body;
|
||||
var up = user.party.quest.progress.up;
|
||||
expect(up).to.be.above(0);
|
||||
request.post(baseURL+'/user/batch-update')
|
||||
.send([
|
||||
{op:'score',params:{direction:'up',id:user.dailys[2].id}},
|
||||
{op:'score',params:{direction:'up',id:user.dailys[3].id}}
|
||||
])
|
||||
.end(function(res){
|
||||
expect(res.body.party.quest.progress.up).to.be.above(up)
|
||||
user
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
it("Doesn't include people who aren't participating");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user