diff --git a/spec/factories.rb b/spec/factories.rb index e6209c92..8af2a712 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -7,7 +7,7 @@ def fetch_jwt_token(user_id) iat = Time.now.to_i jti_raw = [JwtOptions.secret, iat].join(':').to_s jti = Digest::MD5.hexdigest(jti_raw) - payload = { data: { user_id: user_id }, exp: Time.now.to_i + JwtOptions.expiry, sub: user_id, iat: iat, jti: jti } + payload = { user_id: user_id , exp: Time.now.to_i + JwtOptions.expiry, sub: user_id, iat: iat, jti: jti } token = JWT.encode payload, JwtOptions.secret, JwtOptions.algorithm "Bearer #{token}" end