Use toggle() to hide the poll creator

This commit is contained in:
Jonne Haß 2014-05-24 21:40:48 +02:00
parent 77133a4062
commit e6348aa705
2 changed files with 5 additions and 3 deletions

View file

@ -202,7 +202,7 @@ app.views.Publisher = Backbone.View.extend({
},
togglePollCreator: function(){
this.view_poll_creator.$el.toggleClass('active');
this.view_poll_creator.$el.toggle();
this.el_input.focus();
},

View file

@ -150,6 +150,8 @@ describe("app.views.Publisher", function() {
});
it("disables submitting", function() {
this.view.togglePollCreator();
this.view.setText('TESTING');
expect(this.view.el_submit.prop('disabled')).toBeFalsy();
expect(this.view.el_preview.prop('disabled')).toBeFalsy();