mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Discount Bundled Quests (#8731)
* refactor(content): split quests file * feat(purchases): sell bundled quests * fix(style): address linting errors * test(bundles): shop and purchase tests * fix(test): remove only * test(bundles): check balance deduction * docs(content): comment bundle structure * fix(test): account for cumulative balance
This commit is contained in:
@@ -206,6 +206,20 @@ describe('Quests Service', function() {
|
||||
});
|
||||
});
|
||||
|
||||
context('quest bundles', function() {
|
||||
it('sends bundle object', function(done) {
|
||||
questsService.buyQuest('featheredFriends')
|
||||
.then(function(res) {
|
||||
expect(res).to.eql(content.bundles.featheredFriends);
|
||||
expect(window.alert).to.not.be.called;
|
||||
expect(rejectSpy).to.not.be.called;
|
||||
done();
|
||||
}, rejectSpy);
|
||||
|
||||
scope.$apply();
|
||||
});
|
||||
});
|
||||
|
||||
context('all other quests', function() {
|
||||
it('sends quest object', function(done) {
|
||||
questsService.buyQuest('whale')
|
||||
|
||||
Reference in New Issue
Block a user