clarify regexp and correct some bad backtracking add specs rewrite regex convert mardown style title to plain text title fix bad indentation add jasmine test for post-viewer.js tries to fix bad jasmine test
14 lines
548 B
JavaScript
14 lines
548 B
JavaScript
describe("app.Pages.PostViewer", function(){
|
|
describe("postRenderTemplate", function(){
|
|
beforeEach(function(){
|
|
app.setPreload('post', factory.post({frame_name : "note"}).attributes);
|
|
this.page = new app.pages.PostViewer({id : 2});
|
|
})
|
|
it('translates post title from Markdown to plain text and pushes it in document.title', function () {
|
|
this.page.model.set({title : "### My [Markdown](url) *title*" });
|
|
this.page.postRenderTemplate();
|
|
expect(document.title).toEqual("My Markdown title");
|
|
})
|
|
})
|
|
});
|
|
|