fix jasmine unhappiness I introduced with #3088
This commit is contained in:
parent
4b41f8bf41
commit
1709036764
1 changed files with 10 additions and 1 deletions
|
|
@ -31,7 +31,16 @@ describe("app.views.CommentStream", function(){
|
|||
|
||||
describe("createComment", function(){
|
||||
it("clears the new comment textarea", function(){
|
||||
$(this.view.el).html($("<textarea/>", {"class" : 'comment_box'}).val("hey"))
|
||||
var comment = {
|
||||
"id": 1234,
|
||||
"text": "hey",
|
||||
"author": "not_null"
|
||||
};
|
||||
spyOn($, "ajax").andCallFake(function(params) {
|
||||
params.success(comment);
|
||||
});
|
||||
|
||||
$(this.view.el).html($("<textarea/>", {"class" : 'comment_box'}).val(comment.text))
|
||||
this.view.createComment()
|
||||
expect(this.view.$(".comment_box").val()).toBe("")
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue