clear new comment on submit; include the newer autoexpander in jasmine
This commit is contained in:
parent
25d0f0d87f
commit
9e3521396d
3 changed files with 10 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ app.views.CommentStream = app.views.Base.extend({
|
|||
"text" : this.$(".comment_box").val()
|
||||
});
|
||||
|
||||
this.$(".comment_box").empty()
|
||||
this.$(".comment_box").val("")
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -18,4 +18,12 @@ describe("app.views.CommentStream", function(){
|
|||
expect($.fn.autoResize.mostRecentCall.object.selector).toBe("textarea")
|
||||
})
|
||||
})
|
||||
|
||||
describe("createComment", function(){
|
||||
it("clears the new comment textarea", function(){
|
||||
$(this.view.el).html($("<textarea/>", {"class" : 'comment_box'}).val("hey"))
|
||||
this.view.createComment()
|
||||
expect(this.view.$(".comment_box").val()).toBe("")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ src_files:
|
|||
- public/javascripts/vendor/bootstrap/bootstrap-twipsy.js
|
||||
- public/javascripts/vendor/jquery.tipsy.js
|
||||
- public/javascripts/vendor/jquery.infinitescroll.min.js
|
||||
- public/javascripts/vendor/jquery.autoresize.min.js
|
||||
- public/javascripts/vendor/jquery.autoresize.js
|
||||
- public/javascripts/vendor/jquery.expander.js
|
||||
- public/javascripts/vendor/jquery.charcount.js
|
||||
- public/javascripts/vendor/timeago.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue