Add stylesheet option

closes #2
This commit is contained in:
Chris O'Connor
2014-04-28 14:10:35 -04:00
committed by Douglas Christopher Wilson
parent 5771318d78
commit e40300aa86
3 changed files with 28 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
body {
color: #00ff00;
}
+20
View File
@@ -161,6 +161,26 @@ describe('directory()', function(){
});
});
describe('when setting a custom stylesheet', function () {
var server;
before(function () {
server = createServer('test/fixtures', {'stylesheet': __dirname + '/shared/styles.css'});
});
after(function (done) {
server.close(done);
});
it('should respond with appropriate embedded styles', function (done) {
request(server)
.get('/')
.set('Accept', 'text/html')
.expect(200)
.expect('Content-Type', /html/)
.expect(/color: #00ff00;/)
.end(done);
});
});
describe('when set with trailing slash', function () {
var server;
before(function () {