sample_rails_tailwind/test/controllers/static_pages_controller_test.rb
songtianlun cd558466be feat: add user registration functionality
- Add User model with validations for name and email
- Implement UsersController with new action for signup
- Create views for user signup and home page
- Update routes to include signup path
- Add bcrypt gem for password security
- Include tests for user model and controller actions

This commit establishes the foundation for user registration in the application, ensuring proper validation and security measures are in place. It also enhances the user experience by providing a dedicated signup page.
2024-12-31 14:20:22 +08:00

34 lines
691 B
Ruby

require "test_helper"
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
def setup
@base_title = "Ruby on Rails Tutorial Sample App"
end
test "should get root" do
get root_path
assert_response :success
assert_select "title", full_title("Home")
end
test "should get help" do
get help_path
assert_response :success
assert_select "title", full_title("Help")
end
test "Should get about" do
get about_path
assert_response :success
assert_select "title", full_title("About")
end
test "Should get contact" do
get contact_path
assert_response :success
assert_select "title", full_title("Contact")
end
end