diff options
author | Rafael Lisboa <rafaelzlisboa@gmail.com> | 2015-04-27 12:35:02 -0300 |
---|---|---|
committer | Rafael Lisboa <rafaelzlisboa@gmail.com> | 2015-04-27 12:35:02 -0300 |
commit | 9234ef399cac44dcdc8dab11c20dd162953e447c (patch) | |
tree | bbc3c618a245b903f99c1c41fa726062ead55ebf /web-ui/test/spec/mail_list_actions | |
parent | 5cc53a2ac0b47a05423ed9e4a64e24a3a9994a58 (diff) | |
parent | 6617b24ae00490cf86282147b732cfa31de127fb (diff) |
Merge pull request #373 from roberto/master
Allow user to move emails from trash to inbox
Diffstat (limited to 'web-ui/test/spec/mail_list_actions')
-rw-r--r-- | web-ui/test/spec/mail_list_actions/ui/mail_list_actions.spec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_list_actions/ui/mail_list_actions.spec.js b/web-ui/test/spec/mail_list_actions/ui/mail_list_actions.spec.js index 7f7ba64a..d8917ed9 100644 --- a/web-ui/test/spec/mail_list_actions/ui/mail_list_actions.spec.js +++ b/web-ui/test/spec/mail_list_actions/ui/mail_list_actions.spec.js @@ -28,6 +28,24 @@ describeComponent('mail_list_actions/ui/mail_list_actions', function () { expect(this.component.$node.html()).toMatch('<li><input type="button" id="delete-selected" value="Delete permanently" disabled="disabled"></li>'); }); + + it('should render move to inbox if on trash', function () { + var urlParams = require('page/router/url_params'); + spyOn(urlParams, 'getTag').and.returnValue('trash'); + + this.setupComponent(); + + expect(this.component.$node.html()).toMatch('<li><input type="button" id="recover-selected" value="Move to Inbox" disabled="disabled"></li>'); + }); + + it('should not render move to inbox if on trash', function () { + var urlParams = require('page/router/url_params'); + spyOn(urlParams, 'getTag').and.returnValue('inbox'); + + this.setupComponent(); + + expect(this.component.$node.html()).not.toMatch('<li><input type="button" id="recover-selected" value="Move to Inbox" disabled="disabled"></li>'); + }); }); }); |