mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Removed 2 sec pause
refs #2660 - removed timeout from routes tests (since Ghost is used as module it is restarted before logging in) - Casper.js does only one login and the existing waits are executed after testing login limiters - gain: 8 sec :-/
This commit is contained in:
parent
bb75a1f96c
commit
00ba9fc898
4 changed files with 8 additions and 9 deletions
|
@ -43,7 +43,7 @@ describe('Post API', function () {
|
|||
pattern_meta.should.exist;
|
||||
csrfToken = res.text.match(pattern_meta)[1];
|
||||
|
||||
setTimeout(function () {
|
||||
process.nextTick(function() {
|
||||
request.post('/ghost/signin/')
|
||||
.set('X-CSRF-Token', csrfToken)
|
||||
.send({email: user.email, password: user.password})
|
||||
|
@ -67,7 +67,7 @@ describe('Post API', function () {
|
|||
});
|
||||
});
|
||||
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
});
|
||||
}, done);
|
||||
|
|
|
@ -43,7 +43,7 @@ describe('Settings API', function () {
|
|||
pattern_meta.should.exist;
|
||||
csrfToken = res.text.match(pattern_meta)[1];
|
||||
|
||||
setTimeout(function () {
|
||||
process.nextTick(function() {
|
||||
request.post('/ghost/signin/')
|
||||
.set('X-CSRF-Token', csrfToken)
|
||||
.send({email: user.email, password: user.password})
|
||||
|
@ -67,7 +67,7 @@ describe('Settings API', function () {
|
|||
});
|
||||
});
|
||||
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
});
|
||||
}, done);
|
||||
|
|
|
@ -43,7 +43,7 @@ describe('Tag API', function () {
|
|||
pattern_meta.should.exist;
|
||||
csrfToken = res.text.match(pattern_meta)[1];
|
||||
|
||||
setTimeout(function () {
|
||||
process.nextTick(function() {
|
||||
request.post('/ghost/signin/')
|
||||
.set('X-CSRF-Token', csrfToken)
|
||||
.send({email: user.email, password: user.password})
|
||||
|
@ -67,8 +67,7 @@ describe('Tag API', function () {
|
|||
});
|
||||
});
|
||||
|
||||
}, 2000);
|
||||
|
||||
});
|
||||
});
|
||||
}, done);
|
||||
}).otherwise(function (e) {
|
||||
|
|
|
@ -44,7 +44,7 @@ describe('User API', function () {
|
|||
pattern_meta.should.exist;
|
||||
csrfToken = res.text.match(pattern_meta)[1];
|
||||
|
||||
setTimeout(function () {
|
||||
process.nextTick(function() {
|
||||
request.post('/ghost/signin/')
|
||||
.set('X-CSRF-Token', csrfToken)
|
||||
.send({email: user.email, password: user.password})
|
||||
|
@ -67,7 +67,7 @@ describe('User API', function () {
|
|||
});
|
||||
});
|
||||
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
});
|
||||
}, done);
|
||||
|
|
Loading…
Add table
Reference in a new issue