From 119a34faaeb1440f05d0c2558e78a53484678083 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 4 Jan 2025 10:26:08 +0800 Subject: [PATCH] test: improve users edit tests - Rename test for friendly forwarding to be more concise - Add a separate test for successful user edit These changes enhance the clarity of the test suite by providing a more descriptive name for the friendly forwarding test and separating the successful edit functionality into its own test case, improving maintainability and readability. --- test/integration/users_edit_test.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/users_edit_test.rb b/test/integration/users_edit_test.rb index 67dcf79..029796d 100644 --- a/test/integration/users_edit_test.rb +++ b/test/integration/users_edit_test.rb @@ -15,10 +15,15 @@ class UsersEditTest < ActionDispatch::IntegrationTest assert_redirected_to user_url(@user) end - test "successful edit with friendly forwarding" do + test "friendly forwarding" do get edit_user_path(@user) log_in_as(@user) assert_redirected_to edit_user_url(@user) + end + + test "successful edit" do + log_in_as(@user) + get edit_user_path(@user) assert_template "users/edit" name = "Foo Bae" email = "foo@bar.com"