diff options
author | Ola Bini <ola.bini@gmail.com> | 2014-07-31 19:29:33 -0300 |
---|---|---|
committer | Ola Bini <ola.bini@gmail.com> | 2014-07-31 19:29:33 -0300 |
commit | 04cf441c5ae18400c6b4865b0b37a71718dc9d46 (patch) | |
tree | dd0b0d049ec00389e2d4561b226c46eb1682b997 /web-ui/test/spec/user_alerts | |
parent | 639a663a4c37020003586438fdcd7ac529a00f10 (diff) |
Add web-ui based on previous code
Diffstat (limited to 'web-ui/test/spec/user_alerts')
-rw-r--r-- | web-ui/test/spec/user_alerts/ui/user_alerts.spec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js b/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js new file mode 100644 index 00000000..f013b744 --- /dev/null +++ b/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js @@ -0,0 +1,23 @@ +describeComponent('user_alerts/ui/user_alerts', function () { + 'use strict'; + + beforeEach(function () { + setupComponent('<div id="userAlerts"></div>', { dismissTimeout: 100 }); + }); + + it('should render message when ui:user_alerts:displayMessage is triggered', function () { + this.component.trigger(Smail.events.ui.userAlerts.displayMessage, { message: 'a message' }); + + expect(this.component.$node.html()).toMatch('a message'); + }); + + it('should be emptied and hidden when hide is called', function() { + expect(this.$node).not.toBeHidden(); + this.component.hide() + expect(this.$node).toBeHidden(); + expect(this.$node.html()).toEqual('') + }); + + + +}); |