summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_view
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/spec/mail_view')
-rw-r--r--web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
index 499065c2..6b486fa9 100644
--- a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
+++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js
@@ -99,4 +99,17 @@ describeComponent('mail_view/ui/recipients/recipients_input',function () {
});
});
+ describe('on blur', function() {
+ it('tokenizes recipient email if there is an input val', function() {
+ var addressEnteredEvent = spyOnEvent(this.$node, Pixelated.events.ui.recipients.entered);
+ var blurEvent = $.Event('blur');
+ spyOn(blurEvent, 'preventDefault');
+
+ this.$node.val('a@b.c');
+ this.$node.trigger(blurEvent);
+
+ expect(blurEvent.preventDefault).toHaveBeenCalled();
+ expect(addressEnteredEvent).toHaveBeenTriggeredOnAndWith(this, {name: 'to', address: 'a@b.c'});
+ })
+ });
});