songtianlun
194e441c50
- 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.
21 lines
475 B
Ruby
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
|