Merge branch 'joyclark-autocomplete-click-behavior' into develop

This commit is contained in:
Blade Barringer
2015-05-08 08:45:06 -05:00
3 changed files with 22 additions and 3 deletions

View File

@@ -219,6 +219,20 @@ describe("Autocomplete controller", function() {
});
});
describe("performCompletion", function() {
it('triggers autoComplete', function() {
scope.autoComplete = sinon.spy();
var msg = {user: "boo"}; // scope.autoComplete only cares about user
scope.query = {text: "b"};
scope.performCompletion(msg);
expect(scope.query).to.be.eq(null);
expect(scope.autoComplete.callCount).to.be.eq(1);
expect(scope.autoComplete).to.have.been.calledWith(msg);
});
});
describe("addNewUser", function() {
it('a new message from a new user will modify the usernames', function() {
expect(scope.response).to.be.empty;