mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Reenable prepaid test "bunch of people trying to redeem at once"
This commit is contained in:
parent
def3e9a009
commit
8ddf36ce3c
2 changed files with 97 additions and 3 deletions
spec
96
spec/fixtures/db-sub-redeem-test-3.json
vendored
Normal file
96
spec/fixtures/db-sub-redeem-test-3.json
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17JTAqKaReE7xLUdjGIGtXtl",
|
||||
"card": {
|
||||
"id": "card_17JTAqKaReE7xLUdHHTMsz1i"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7YaLqXE9lrcaKy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user32@me.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000022"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17JTAqKaReE7xLUdHHTMsz1i",
|
||||
"customer": "cus_7YaLqXE9lrcaKy"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7YaLqXE9lrcaKy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7YaLqXE9lrcaKy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user32@me.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000022"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17JTAqKaReE7xLUdHHTMsz1i",
|
||||
"customer": "cus_7YaLqXE9lrcaKy"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17JTArKaReE7xLUd0YVinnrN",
|
||||
"amount": 15000,
|
||||
"customer": "cus_7YaLqXE9lrcaKy",
|
||||
"metadata": {
|
||||
"type": "terminal_subscription",
|
||||
"timestamp": "1450464112509",
|
||||
"months": "3",
|
||||
"productID": "prepaid terminal_subscription"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17JTAqKaReE7xLUdHHTMsz1i",
|
||||
"customer": "cus_7YaLqXE9lrcaKy"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
|
@ -717,9 +717,7 @@ describe '/db/prepaid', ->
|
|||
expect(res.statusCode).not.toEqual(200)
|
||||
done()
|
||||
|
||||
# TODO: Fix this server test
|
||||
|
||||
xit 'Test a bunch of people trying to redeem at once', (done) ->
|
||||
it 'Test a bunch of people trying to redeem at once', (done) ->
|
||||
nockUtils.setupNock 'db-sub-redeem-test-3.json', (err, nockDone) ->
|
||||
doRedeem = (userX, code, testnum, retry, fnDone) =>
|
||||
loginUser userX, () =>
|
||||
|
|
Loading…
Reference in a new issue