fix: validate domains, allow only google.com + sjdonado.de for demo purposes (to avoid phishing scam)

This commit is contained in:
Juan Rodriguez
2023-04-19 17:07:05 +02:00
parent cebdfb35d7
commit f74ec3af20
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class LinkTest < ActiveSupport::TestCase
test 'Should generate an unique slug' do
SecureRandom.stub :alphanumeric, 'ktr4ms' do
link = Link.new
link.url = 'https://test.com'
link.url = 'https://test.sjdonado.de'
link.generate_slug
assert_raise(ActiveRecord::NotNullViolation) { link.save }
end