Skip to content
Myr

Partial tests using real fixtures

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent ff5c958 · Browse files · 2 files+10 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−7 removed

  • tests:+10 added−7 removed

2 files+10 added−7 removed

added:test/fixtures/forum/_thread.jade+1 added
1h1 Forum Thread
modified:test/view.test.js+9 added-7 removed
101 unmodified lines
102 resolve('forum thread post.ejs').should.equal('forumThreadPost');103 },104 105 'test Partial#path for partials': function(){106 var fixtures = __dirname + '/fixtures';107 106 var view = new Partial('user.ejs', { root: '/www' });107 view.path.should.equal('/www/_user.ejs');108 var view = new Partial('user.jade', { root: fixtures });109 view.path.should.equal(fixtures + '/_user.jade');110109 var view = new Partial('user', { parentView: view, root: '/www' });110 view.path.should.equal('/www/_user.ejs');111 var view = new Partial('user', { parentView: view, root: fixtures });112 view.path.should.equal(fixtures + '/_user.jade');113 114 var view = new Partial('forum/thread', { parentView: view });113 view.path.should.equal('/www/forum/_thread.ejs');115 view.path.should.equal(fixtures + '/forum/_thread.jade');116115 var view = new Partial('forum/thread.jade', { root: '/www' });116 view.path.should.equal('/www/forum/_thread.jade');117 var view = new Partial('forum/thread.jade', { root: fixtures });118 view.path.should.equal(fixtures + '/forum/_thread.jade');119 },120121 'test #render()': function(){122 var app = create();
645 unmodified lines