Skip to content

Commit 77dadb6

Browse files
committed
fixes #118, answerWasCorrect
1 parent 3680e67 commit 77dadb6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

spec/learnwords2/LWBoxOfQuestionsSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ describe("BoxOfQuestions construction", function() {
109109
expect(lw).toHaveMethod("moveQuestionForward");
110110
expect(lw).toHaveMethod("moveQuestionBackwards");
111111

112+
// synonyms
113+
expect(lw).toHaveMethod("answerWasCorrect");
114+
expect(lw).toHaveMethod("answerWasWrong");
115+
112116

113117
expect(lw).toHaveMethod("importFrom");
114118
expect(lw).toHaveMethod("wordsToRepeat");

src/BoxOfQuestions.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ function BoxOfQuestions(db) {
229229

230230

231231

232-
233-
234-
232+
answerWasWrong : function(){this.moveQuestionBackwards()},
235233

236234

237235
moveQuestionForward : function(){
@@ -267,6 +265,7 @@ function BoxOfQuestions(db) {
267265

268266

269267

268+
answerWasCorrect : function(){this.moveQuestionForward()},
270269

271270

272271

@@ -465,6 +464,9 @@ function BoxOfQuestions(db) {
465464

466465
}
467466

467+
468+
469+
468470
}
469471

470472

0 commit comments

Comments
 (0)