Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
done writing the default compile tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDarcyMurphy committed Mar 20, 2012
1 parent 3bad311 commit e309ef2
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion test/upfront.js
Expand Up @@ -462,13 +462,45 @@ describe('UpFront', function(){
})
});

it('returns without error', function(){
it('returns without error', function(done){
upfront.compile(function(err, success){
should.not.exist(err);
should.exist(success);
done();
});
});

it('loads all expected templates correctly', function(done){
upfront.compile(function(err, success){
should.exist(app.settings.templates);
app.settings.templates.should.have.property('extension_html');
app.settings.templates.should.have.property('extension_utml');
app.settings.templates.should.have.property('subone/nested');
app.settings.templates.should.have.property('subone/subtwo/nested2');
done();
});
});

it('ignores unsupported file types by extension', function(done){
upfront.compile(function(err, success){
should.exist(app.settings.templates);
app.settings.templates.should.not.have.property('extension_ejs');
app.settings.templates.should.not.have.property('extension_jade');
app.settings.templates.should.not.have.property('extension_md');
app.settings.templates.should.not.have.property('unrecognized');
done();
});
});

it('does not ignore file types based on slug name', function(done){
upfront.compile(function(err, success){
should.exist(app.settings.templates);
app.settings.templates.should.have.property('ignore_me');
done();
});
});


});

describe('Custom Configuration', function(){
Expand Down

0 comments on commit e309ef2

Please sign in to comment.