Skip to content

Commit 1cd59b1

Browse files
committed
修改测试断言的文案
1 parent c9356d0 commit 1cd59b1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/httpsRedirect_test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@ app.get('/test', function (req, res) {
1919
});
2020

2121
var request = require('supertest');
22+
require('should');
2223

2324
describe('httsRedirect', function() {
2425
it('test', function(done) {
2526
request(app)
2627
.get('/test')
2728
.set('host', 'stg-abc.leanapp.cn')
2829
.expect(302)
29-
.expect("Found. Redirecting to https://stg-abc.leanapp.cn/test", done);
30+
.end(function(err, res) {
31+
res.headers.location.should.equal('https://stg-abc.leanapp.cn/test');
32+
res.text.should.endWith('Redirecting to https://stg-abc.leanapp.cn/test');
33+
done();
34+
});
3035
});
3136

3237
it('not_leanapp_host', function(done) {

0 commit comments

Comments
 (0)