mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
test 2nd argument for openModal
This commit is contained in:
parent
fbc1a9ae86
commit
c3b09d8cce
1 changed files with 10 additions and 4 deletions
|
|
@ -108,8 +108,11 @@ describe("Chat Controller", function() {
|
|||
scope.copyToDo(message);
|
||||
|
||||
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() {
|
||||
|
|
@ -126,8 +129,11 @@ describe("Chat Controller", function() {
|
|||
scope.copyToDo(message);
|
||||
|
||||
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
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue