mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-17 19:12:33 -05:00
Fix(ish) race conditions in server tests
This commit is contained in:
parent
99bae92fcb
commit
d829d15528
2 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ if (database.generateMongoConnectionString() !== dbString) {
|
||||||
throw Error('Stopping server tests because db connection string was not as expected.');
|
throw Error('Stopping server tests because db connection string was not as expected.');
|
||||||
}
|
}
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 10; // for long Stripe tests
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 15; // for long Stripe tests
|
||||||
require('../server/common'); // Make sure global testing functions are set up
|
require('../server/common'); // Make sure global testing functions are set up
|
||||||
|
|
||||||
// Ignore Stripe/Nocking erroring
|
// Ignore Stripe/Nocking erroring
|
||||||
|
|
|
@ -403,10 +403,10 @@ describe 'Clans', ->
|
||||||
loginNewUser (user2) ->
|
loginNewUser (user2) ->
|
||||||
user2.set 'stripe.free', true
|
user2.set 'stripe.free', true
|
||||||
user2.save (err) ->
|
user2.save (err) ->
|
||||||
request.put {uri: "#{clanURL}/#{clan.id}/join" }, (err, res, body) ->
|
request.put {uri: "#{clanURL}/#{clan.id}/join" }, (err, res, body) ->
|
||||||
expect(err).toBeNull()
|
expect(err).toBeNull()
|
||||||
expect(res.statusCode).toBe(200)
|
expect(res.statusCode).toBe(200)
|
||||||
done()
|
done()
|
||||||
|
|
||||||
it 'Join clan when not premium 403', (done) ->
|
it 'Join clan when not premium 403', (done) ->
|
||||||
loginNewUser (user1) ->
|
loginNewUser (user1) ->
|
||||||
|
|
Loading…
Reference in a new issue