summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_list_actions
diff options
context:
space:
mode:
authorRoberto Soares <roberto.tech@gmail.com>2015-04-09 15:58:22 -0300
committerRoberto Soares <roberto.tech@gmail.com>2015-04-09 15:59:38 -0300
commite5b4ca353863a600a8d6151090b83f3210720a47 (patch)
treedc815c1e397362be7d5cfe7d5536951000292f07 /web-ui/test/spec/mail_list_actions
parentbeac9142c2766ed8daf7dd13b6ba22b7895402a5 (diff)
listening event 'recoverMany'
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.js18
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>');
+ });
});
});