songtianlun
cd558466be
- 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.
34 lines
691 B
Ruby
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
|
|
|