diaspora/spec/javascripts/app/pages/profile_spec.js
danielgrippi f62b9f9698 wip.
2012-04-21 13:12:56 -07:00

23 lines
621 B
JavaScript

describe("app.pages.Profile", function(){
beforeEach(function(){
this.page = new app.pages.Profile();
this.stream = this.page.stream
});
it("passes the model down to the post view", function(){
expect(this.page.canvasView.model).toBeDefined()
expect(this.page.canvasView.model).toBe(this.stream)
});
it("fetches the stream for the user", function(){
spyOn(this.stream, "fetch")
new app.pages.Profile({model : this.stream})
expect(this.stream.fetch).toHaveBeenCalled()
})
describe("rendering", function(){
beforeEach(function(){
this.page.render();
});
});
});