res.respond: allow for thrid parameter (message), refactor shared ops responses and adapt tests

This commit is contained in:
Matteo Pagliazzi
2016-04-21 00:52:03 +02:00
parent 9e3d8ba4ac
commit 6568fcfd5e
81 changed files with 419 additions and 465 deletions

View File

@@ -18,13 +18,11 @@ describe('shared.ops.disableClasses', () => {
user.preferences.autoAllocate = false;
user.stats.points = 2;
let res = disableClasses(user);
expect(res).to.eql({
data: {
preferences: user.preferences,
stats: user.stats,
flags: user.flags,
},
let [data] = disableClasses(user);
expect(data).to.eql({
preferences: user.preferences,
stats: user.stats,
flags: user.flags,
});
expect(user.stats.class).to.equal('warrior');