From 534e1be6226bde8b154e62c146844a79a0331f95 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Tue, 25 Sep 2012 23:04:24 -0400 Subject: [PATCH] numerical tests down-score --- test/user.mocha.coffee | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/user.mocha.coffee b/test/user.mocha.coffee index 439d99f159..277f6544c9 100644 --- a/test/user.mocha.coffee +++ b/test/user.mocha.coffee @@ -72,7 +72,8 @@ describe 'User', -> [taskObj.id, taskObj.value] = [uuid, 0] model.at("_#{type}List").push taskObj - beforeEach -> resetUser() + beforeEach -> + resetUser() describe 'Habits', -> @@ -147,6 +148,7 @@ describe 'User', -> describe 'Lvl & Items', -> + beforeEach -> freshTask {type: 'habit', text: 'Habit', up: true, down: true} @@ -159,18 +161,18 @@ describe 'User', -> scoring.score(uuid, 'down') [stats, task] = statsTask() - expect(stast.hp).to.eql 49 + expect(stats.hp).to.eql 49 expect(task.value).to.eql -1 scoring.score(uuid, 'down') [stats, task] = statsTask() - expect(stast.hp).to.eql 48 + expect(stats.hp).to.eql 47.9 expect(task.value).to.eql -2.1 scoring.score(uuid, 'down') [stats, task] = statsTask() - expect(stast.hp).to.eql 47 - expect(task.value).to.eql -3.2 + expect(stats.hp).to.eql 46.69 + expect(task.value).to.eql -3.31 it 'modified exp/gp based on lvl & weapon', ->