diaspora/spec/javascripts/app/pages/framer_spec.js
Dennis Collinson 11eb1eb7d8 MS DC fix tests
2012-03-27 14:52:53 -07:00

27 lines
733 B
JavaScript

describe("app.pages.Framer", function(){
beforeEach(function(){
loginAs(factory.user())
app.frame = new factory.statusMessage();
this.page = new app.pages.Framer();
});
it("passes the model down to the template picker", function(){
expect(this.page.templatePicker.model).toBe(app.frame)
});
it("passes the model down to the post view", function(){
expect(this.page._postView.model).toBe(app.frame)
});
describe("rendering", function(){
beforeEach(function(){
this.page.render();
});
it("saves the model when you click done",function(){
spyOn(app.frame, "save");
this.page.$("button.done").click();
expect(app.frame.save).toHaveBeenCalled();
});
});
});