mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-23 22:27:06 +00:00
Move ulitmate gear
This commit is contained in:
parent
1bcc241c04
commit
2598fa1ecb
2 changed files with 28 additions and 30 deletions
|
|
@ -1,30 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var shared = require('../../common/script/index.coffee');
|
||||
shared.i18n.translations = require('../../website/src/i18n.js').translations
|
||||
|
||||
require('./test_helper');
|
||||
|
||||
describe('User.fns', function() {
|
||||
describe('.ultimateGear', function() {
|
||||
|
||||
it('sets armoirEnabled when partial achievement already achieved', function() {
|
||||
var user = shared.wrap({
|
||||
items: { gear: { owned: {
|
||||
toObject: function() { return {
|
||||
armor_warrior_5: true,
|
||||
shield_warrior_5: true,
|
||||
head_warrior_5: true,
|
||||
weapon_warrior_6: true
|
||||
}}
|
||||
}}},
|
||||
achievements: {
|
||||
ultimateGearSets: {}
|
||||
},
|
||||
flags: {}
|
||||
});
|
||||
user.fns.ultimateGear();
|
||||
expect(user.flags.armoireEnabled).to.equal(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
28
test/common/user.fns.ultimateGear.test.js
Normal file
28
test/common/user.fns.ultimateGear.test.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
var shared = require('../../common/script/index.coffee');
|
||||
shared.i18n.translations = require('../../website/src/i18n.js').translations
|
||||
|
||||
require('./test_helper');
|
||||
|
||||
describe('User.fns.ultimateGear', function() {
|
||||
|
||||
it('sets armoirEnabled when partial achievement already achieved', function() {
|
||||
var user = shared.wrap({
|
||||
items: { gear: { owned: {
|
||||
toObject: function() { return {
|
||||
armor_warrior_5: true,
|
||||
shield_warrior_5: true,
|
||||
head_warrior_5: true,
|
||||
weapon_warrior_6: true
|
||||
}}
|
||||
}}},
|
||||
achievements: {
|
||||
ultimateGearSets: {}
|
||||
},
|
||||
flags: {}
|
||||
});
|
||||
user.fns.ultimateGear();
|
||||
expect(user.flags.armoireEnabled).to.equal(true);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue