Skip to content

Commit

Permalink
update user test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklynhma committed Nov 15, 2024
1 parent 5bd20d8 commit 16e829f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/models/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ class UserTest < ActiveSupport::TestCase
should_not allow_value("012345678901234567890").for(:twitter_username)
end

context "homepage url" do
should allow_value("https://www.mywebsite.com").for(:homepage_url)
should_not allow_value("http://non-secure-site.com").for(:homepage_url)
should_not allow_value("<html><body>hi</body><html>").for(:homepage_url)
end

context "password" do
should "be between 10 characters and 72 bytes" do
user = build(:user, password: "%5a&12ed/")
Expand Down

0 comments on commit 16e829f

Please sign in to comment.