[API v3] Fix calls to user.ops and deleting tags (#7204)
* v3: fixes calls to user.ops from views and deleting tags * v3: fix tests that use user._statsComputed
This commit is contained in:
@@ -76,7 +76,11 @@ describe('Stats Service', function() {
|
||||
"armor" : "armor_warrior_1"
|
||||
};
|
||||
var user = {
|
||||
_statsComputed: { str: 50 },
|
||||
fns: {
|
||||
statsComputed: function () {
|
||||
return { str: 50 };
|
||||
},
|
||||
},
|
||||
stats: {
|
||||
lvl: 10,
|
||||
buffs: { str: 10 },
|
||||
@@ -252,7 +256,8 @@ describe('Stats Service', function() {
|
||||
|
||||
describe('mpDisplay', function() {
|
||||
it('displays mp as "mp / totalMP"', function() {
|
||||
user._statsComputed = { maxMP: 100 };
|
||||
user.fns = {};
|
||||
user.fns.statsComputed = function () { return { maxMP: 100 } };
|
||||
user.stats.mp = 30;
|
||||
var mpDisplay = statCalc.mpDisplay(user);
|
||||
|
||||
@@ -260,7 +265,8 @@ describe('Stats Service', function() {
|
||||
});
|
||||
|
||||
it('Rounds mp down when given a decimal', function() {
|
||||
user._statsComputed = { maxMP: 100 };
|
||||
user.fns = {};
|
||||
user.fns.statsComputed = function () { return { maxMP: 100 } };
|
||||
user.stats.mp = 30.99;
|
||||
var mpDisplay = statCalc.mpDisplay(user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user