Skip to content

Commit

Permalink
Use normal_user factory in UsersControllerTest
Browse files Browse the repository at this point in the history
As suggested by @chrislo [1]

[1]: #2567 (comment)
  • Loading branch information
floehopper committed Dec 5, 2023
1 parent 1c77886 commit 1e98cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/controllers/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class UsersControllerTest < ActionController::TestCase
end

should "display the user's role but no link to change the role" do
user = create(:user, role: Roles::Normal.role_name)
user = create(:normal_user)
get :edit, params: { id: user.id }
assert_select "*", text: /Role\s+Normal/
assert_select "a", href: edit_user_role_path(user), text: /Change\s+Role/, count: 0
Expand Down

0 comments on commit 1e98cb9

Please sign in to comment.