Skip to content

Commit

Permalink
Fix YodaCondition
Browse files Browse the repository at this point in the history
😅 TIL there is a YodaCondition check in Rubocop
  • Loading branch information
tvdeyen committed Jan 16, 2021
1 parent f86f352 commit 8be38de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/alchemy/test_support/integration_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module IntegrationHelpers
# Pass either a user object or a symbol in the format of ':as_admin'.
#
def authorize_user(user_or_role = nil)
if "::#{user_or_role.class.name}" == Alchemy.user_class_name
if Alchemy.user_class_name == "::#{user_or_role.class.name}"
user = user_or_role
else
user = build(:alchemy_dummy_user, user_or_role)
Expand Down

0 comments on commit 8be38de

Please sign in to comment.