mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
test 2nd argument for openModal
This commit is contained in:
@@ -108,8 +108,11 @@ describe("Chat Controller", function() {
|
|||||||
scope.copyToDo(message);
|
scope.copyToDo(message);
|
||||||
|
|
||||||
modalSpy.should.have.been.calledOnce;
|
modalSpy.should.have.been.calledOnce;
|
||||||
// @TODO, should probably check the modal options that get passed in as well
|
|
||||||
modalSpy.should.have.been.calledWith('copyChatToDo');
|
modalSpy.should.have.been.calledWith('copyChatToDo', sinon.match(function(callArgToMatch){
|
||||||
|
return callArgToMatch.controller == 'CopyMessageModalCtrl'
|
||||||
|
&& callArgToMatch.scope.text == message.text
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('when copying a system message it opens modal with information from message', function() {
|
it('when copying a system message it opens modal with information from message', function() {
|
||||||
@@ -126,8 +129,11 @@ describe("Chat Controller", function() {
|
|||||||
scope.copyToDo(message);
|
scope.copyToDo(message);
|
||||||
|
|
||||||
modalSpy.should.have.been.calledOnce;
|
modalSpy.should.have.been.calledOnce;
|
||||||
// @TODO, should probably check the modal options that get passed in as well
|
|
||||||
modalSpy.should.have.been.calledWith('copyChatToDo');
|
modalSpy.should.have.been.calledWith('copyChatToDo', sinon.match(function(callArgToMatch){
|
||||||
|
return callArgToMatch.controller == 'CopyMessageModalCtrl'
|
||||||
|
&& callArgToMatch.scope.text == message.text
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user