mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
freeze Date in Recurly tests before all calls
beforeEach freezes and resets for each subtest, which does not give the desired result as the time increases between each subtest, we want to freeze once at the beginning and reset at the end using before/after.
This commit is contained in:
parent
f5c39efcac
commit
cc9c8fdc94
1 changed files with 5 additions and 5 deletions
|
@ -108,13 +108,10 @@ describe "RecurlyWrapper", ->
|
|||
Settings.defaultPlanCode =
|
||||
collaborators: 0
|
||||
versioning: false
|
||||
tk.freeze(Date.now())
|
||||
|
||||
afterEach ->
|
||||
tk.reset()
|
||||
|
||||
|
||||
describe "sign", ->
|
||||
before (done) ->
|
||||
tk.freeze Date.now() # freeze the time for these tests
|
||||
RecurlyWrapper.sign({
|
||||
subscription :
|
||||
plan_code : "gold"
|
||||
|
@ -124,6 +121,9 @@ describe "RecurlyWrapper", ->
|
|||
done()
|
||||
)
|
||||
|
||||
after ->
|
||||
tk.reset()
|
||||
|
||||
it "should be signed correctly", ->
|
||||
signed = @signature.split("|")[0]
|
||||
query = @signature.split("|")[1]
|
||||
|
|
Loading…
Reference in a new issue