Permalink
Browse files

the name tests now live in test.name

We now actually test name memory
  • Loading branch information...
1 parent 9d07fbe commit d26fe7a3bd4835b502e4392a9216a7e4eb45cd04 @obra committed Jul 31, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −1 app/test.html
  2. +5 −0 app/tests/{test.dummy.js → test.name.js}
View
@@ -8,7 +8,7 @@
<script>mocha.setup('bdd')</script>
<script src="scripts/require-jquery.js"></script>
- <script src="tests/test.dummy.js"></script>
+ <script src="tests/test.name.js"></script>
<script>
$(function(){
requirejs.config({
@@ -10,9 +10,14 @@ describe('Factoid plugin', function(){
});
describe('name memory', function(){
it('should learn my name', function(){
+ response = Rei.handleQuery("What is my name?");
+ response.responses['factoids'][0].should.equal(0);
var response = Rei.handleQuery("my name is Yoz");
console.log("Factoid response:", response.responses);
response.responses['factoids'][0].should.equal(1);
+ response = Rei.handleQuery("What is my name?");
+ response.responses['factoids'][0].should.equal(1);
+ response.responses['factoids'][1].should.equal("Yoz");
});
});
});

0 comments on commit d26fe7a

Please sign in to comment.