mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
var app = require('../../app');
|
|
var request = require('supertest')(app);
|
|
|
|
describe('test/controllers/static.test.js', function () {
|
|
it('should get /about', function (done) {
|
|
request.get('/about').expect(200)
|
|
.end(function (err, res) {
|
|
res.text.should.containEql('CNode 社区由一批热爱 Node.js 技术的工程师发起');
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should get /faq', function (done) {
|
|
request.get('/faq').expect(200)
|
|
.end(function (err, res) {
|
|
res.text.should.containEql('CNode 社区和 Node Club 是什么关系?');
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should get /getstart', function (done) {
|
|
request.get('/getstart').expect(200)
|
|
.end(function (err, res) {
|
|
res.text.should.containEql('Node.js 新手入门');
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
it('should get /robots.txt', function (done) {
|
|
request.get('/robots.txt').expect(200)
|
|
.end(function (err, res) {
|
|
res.text.should.containEql('User-Agent');
|
|
done(err);
|
|
});
|
|
});
|
|
});
|