diaspora/spec/javascripts/app/views/post/stream_frame_spec.js
2012-05-22 12:38:48 -07:00

18 lines
No EOL
617 B
JavaScript

describe("app.views.Post.StreamFrame", function(){
beforeEach(function(){
this.post = factory.post()
this.view = new app.views.Post.StreamFrame({model : this.post})
app.page = new app.pages.Stream({model : new app.models.Stream()})
})
describe("rendering", function(){
context("clicking the content", function(){
it("fetches the interaction pane", function(){
spyOn(this.post.interactions, "fetch").andReturn(new $.Deferred)
this.view.render()
this.view.$('.content').click()
expect(this.post.interactions.fetch).toHaveBeenCalled()
})
})
})
});