mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Merge branch 'joyclark-autocomplete-click-behavior' into develop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user