mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-06-04 06:19:25 +08:00
31 lines
812 B
JavaScript
31 lines
812 B
JavaScript
describe("Dashboard", function() {
|
|
|
|
it('should redirect from root', function(done) {
|
|
dashboard.get(function(err, result) {
|
|
expect(result).to.exist;
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should render HTML', function(done) {
|
|
dashboard.use('/').get(function(err, result) {
|
|
expect(result).to.exist;
|
|
expect(result.indexOf('<!DOCTYPE html>')).to.not.equal(-1);
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should return a static asset from a folder', function(done) {
|
|
dashboard.use('/stylesheets/style.css').get(function(err, result) {
|
|
expect(result).to.exist;
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should return a 404 for a bad filename', function(done) {
|
|
dashboard.use('/bogus/file').get(function(err, result) {
|
|
expect(result).to.not.exist;
|
|
done();
|
|
});
|
|
});
|
|
}); |