Skip to content

Commit 6f6621f

Browse files
committed
Handle auth API without a token
1 parent f5de6e7 commit 6f6621f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/support/vcr_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
def fix_token_expires_at(interaction)
22
data = JSON.parse(interaction.response.body)
3+
return if data.dig("token", "expires_at").nil?
4+
35
data["token"]["expires_at"] = "9999-12-31T23:59:59.999999Z"
46
interaction.response.body = data.to_json.force_encoding('ASCII-8BIT')
57
end

0 commit comments

Comments
 (0)