Merge pull request #3095 from Raven24/fix-jasmine-comment-error
fix jasmine unhappiness I introduced with #3088
This commit is contained in:
commit
7ce61fd4b1
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