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.
This commit is contained in:
parent
712cd10894
commit
119a34faae
@ -15,10 +15,15 @@ class UsersEditTest < ActionDispatch::IntegrationTest
|
|||||||
assert_redirected_to user_url(@user)
|
assert_redirected_to user_url(@user)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "successful edit with friendly forwarding" do
|
test "friendly forwarding" do
|
||||||
get edit_user_path(@user)
|
get edit_user_path(@user)
|
||||||
log_in_as(@user)
|
log_in_as(@user)
|
||||||
assert_redirected_to edit_user_url(@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"
|
assert_template "users/edit"
|
||||||
name = "Foo Bae"
|
name = "Foo Bae"
|
||||||
email = "foo@bar.com"
|
email = "foo@bar.com"
|
||||||
|
Loading…
Reference in New Issue
Block a user