summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-11-13 19:12:02 -0200
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-11-13 19:12:02 -0200
commitc8e25d72118c6299424e4483f96707182ced9e27 (patch)
tree55e49fda907a947f3afed3faa7b4d16aec913442 /web-ui/test
parenta5db6de4510ddb0028642379f424f57cfa4c9f48 (diff)
Issue #525 - Fixed broken tests
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/mail_view/ui/compose_box.spec.js6
-rw-r--r--web-ui/test/spec/mixins/with_mail_edit_base.spec.js6
2 files changed, 12 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/compose_box.spec.js b/web-ui/test/spec/mail_view/ui/compose_box.spec.js
index 4e43a2ff..84f1e0ed 100644
--- a/web-ui/test/spec/mail_view/ui/compose_box.spec.js
+++ b/web-ui/test/spec/mail_view/ui/compose_box.spec.js
@@ -3,6 +3,12 @@ describeComponent('mail_view/ui/compose_box', function () {
beforeEach(function () {
Pixelated.mockBloodhound();
this.setupComponent('<div style="display:none"></div>');
+
+ spyOn(this.component, 'trim_recipient').and.callFake(function(recipients) {
+ return recipients.map(function(recipient) {
+ return recipient.trim();
+ });
+ });
});
diff --git a/web-ui/test/spec/mixins/with_mail_edit_base.spec.js b/web-ui/test/spec/mixins/with_mail_edit_base.spec.js
index 940b4b5e..601f2c11 100644
--- a/web-ui/test/spec/mixins/with_mail_edit_base.spec.js
+++ b/web-ui/test/spec/mixins/with_mail_edit_base.spec.js
@@ -7,6 +7,12 @@ describeMixin('mixins/with_mail_edit_base', function () {
this.component.buildMail = function (tag) {
return { header: { to: ['a@smth.com'], from: 'b@smth.com', subject: 'Sbject' } };
};
+
+ spyOn(this.component, 'trim_recipient').and.callFake(function(recipients) {
+ return recipients.map(function(recipient) {
+ return recipient.trim();
+ });
+ });
});
describe('initialization', function() {