Add username format restrictions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Râu Cao
2023-02-19 12:04:24 +08:00
parent df3ec9f90a
commit 9407c7a94d
2 changed files with 13 additions and 0 deletions

View File

@@ -71,6 +71,12 @@ RSpec.describe "Signup", type: :feature do
fill_in "user_cn", with: "t"
click_button "Continue"
expect(page).to have_content("Username is too short")
fill_in "user_cn", with: "-tony"
click_button "Continue"
expect(page).to have_content("Username is invalid")
fill_in "user_cn", with: "$atoshi"
click_button "Continue"
expect(page).to have_content("Username is invalid")
fill_in "user_cn", with: "jimmy"
click_button "Continue"
expect(page).to have_content("Username has already been taken")