diaspora/spec/javascripts/app/views/post/wallpaper_view_spec.js
Dennis Collinson 59f7f504e8 Wallpaper Mood
2012-03-29 15:14:09 -07:00

14 lines
No EOL
625 B
JavaScript

describe("app.views.Post.Wallpaper", function(){
beforeEach(function(){
this.post = factory.post({photos : [factory.photoAttrs({sizes :{large : "http://omgimabackground.com/wow.gif"}})]})
this.view = new app.views.Post.Wallpaper({model : this.post})
})
describe("rendering", function(){
it("has the image as the photo-fill", function(){
this.view.render()
expect(this.view.$(".photo-fill").data("img-src")).toBe("http://omgimabackground.com/wow.gif") //for the cuke
expect(this.view.$(".photo-fill").css("background-image")).toBe("url(http://omgimabackground.com/wow.gif)")
})
})
})