fix resharing a reshare, javascript isn't ruby :P

This commit is contained in:
Jonne Haß 2012-01-24 19:38:53 +01:00
parent 5ad15974fb
commit 6f283632c5
2 changed files with 7 additions and 3 deletions

View file

@ -5,7 +5,7 @@ app.models.Reshare = app.models.Post.extend({
}, },
reshare : function(){ reshare : function(){
this.rootPost().reshare() return this.rootPost().reshare()
}, },
reshareAuthor : function(){ reshareAuthor : function(){

View file

@ -22,7 +22,11 @@ describe("app.models.Reshare", function(){
spyOn(this.reshare.rootPost(), "reshare") spyOn(this.reshare.rootPost(), "reshare")
this.reshare.reshare() this.reshare.reshare()
expect(this.reshare.rootPost().reshare).toHaveBeenCalled() expect(this.reshare.rootPost().reshare).toHaveBeenCalled()
}) });
})
it("returns something", function() {
expect(this.reshare.reshare()).toBeDefined();
});
});
}); });