diaspora/spec/javascripts/app/views/photo_viewer_spec.js
Dennis Collinson 6288eff599 day mood for a post responds to content
extract creating a post with templates to a static post view method.

Legacy templates extracted, day view

day mood shows photos and has variable text size
2012-03-27 14:54:27 -07:00

19 lines
No EOL
668 B
JavaScript

describe("app.views.PhotoViewer", function(){
beforeEach(function(){
this.model = factory.post({
photos : [
factory.photoAttrs({sizes : {large : "http://tieguy.org/me.jpg"}}),
factory.photoAttrs({sizes : {large : "http://whatthefuckiselizabethstarkupto.com/none_knows.gif"}}) //SIC
]
})
this.view = new app.views.PhotoViewer({model : this.model})
})
describe("rendering", function(){
it("should have an image for each photoAttr on the model", function(){
this.view.render()
expect(this.view.$("img").length).toBe(2)
expect(this.view.$("img[src='http://tieguy.org/me.jpg']")).toExist()
})
})
})