sample_rails_tailwind/test/integration/user_show_test.rb
songtianlun 194e441c50 style: standardize quotes in tests
- Changed single quotes to double quotes in assertions for consistency.
- Updated routes file for spacing consistency in resource declaration.

These changes improve code readability and maintain consistency in the
codebase, making it easier for developers to follow the style guide.
2025-01-07 11:58:37 +08:00

21 lines
475 B
Ruby

require "test_helper"
class UserShowTest < ActionDispatch::IntegrationTest
def setup
@inactive_user = users(:inactive)
@active_user = users(:archer)
end
test "should redirect when user not activated" do
get user_path(@inactive_user)
assert_response :redirect
assert_redirected_to root_url
end
test "should display user when activated" do
get user_path(@active_user)
assert_response :success
assert_template "users/show"
end
end