Extract events loading from overloaded UsersController

This commit is contained in:
David Heinemeier Hansson
2025-11-02 17:31:28 +01:00
parent 6a62df470c
commit bced7405df
6 changed files with 66 additions and 31 deletions
@@ -0,0 +1,17 @@
require "test_helper"
class Users::EventsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "show self" do
get user_events_path(users(:kevin))
assert_in_body "What have you been up to?"
end
test "show other" do
get user_events_path(users(:david))
assert_in_body "What has David been up to?"
end
end