diaspora/spec/javascripts/app/pages/framer_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

27 lines
734 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();
});
});
});