fix: validate domains, allow only google.com + sjdonado.de for demo purposes (to avoid phishing scam)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user