Skip to content

Commit

Permalink
Fix auto formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessa-passage committed Nov 11, 2024
1 parent 47df706 commit 3d42c55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/passageidentity/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def authenticate_request(request)

# Get the token based on the strategy

if @auth_strategy.match?(Passage::COOKIE_STRATEGY)
if @auth_strategy == Passage::COOKIE_STRATEGY
unless request.cookies.key?('psg_auth_token')
raise PassageError.new(
message:
Expand Down
2 changes: 1 addition & 1 deletion lib/passageidentity/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Passage
class PassageError < StandardError
attr_reader :status_code, :status_text, :message, :error

def initialize(message, status_code: nil, body: nil)
def initialize(message:, status_code: nil, body: nil)
super(message)

@message = message
Expand Down
6 changes: 4 additions & 2 deletions tests/user_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_create_delete_user
)
assert_equal '[email protected]', user.email
assert_equal 'cool', user.user_metadata[:example1]
PassageClient.user.delete(user_id: user.id)
deleted = PassageClient.user.delete(user_id: user.id)
assert_equal true, deleted
end

Expand Down Expand Up @@ -79,7 +79,9 @@ def test_invalid_get_user_by_identifier
user = PassageClient.user.get(user_id: $global_test_user.id)
assert_equal $global_test_user.id, user.id

assert_raise Passage::PassageError PassageClient.user.get_by_identifier(user_identifier: '[email protected]')
assert_raise Passage::PassageError do
PassageClient.user.get_by_identifier(user_identifier: '[email protected]')
end
end

def test_deactivate_user
Expand Down

0 comments on commit 3d42c55

Please sign in to comment.