You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec/models/preview_card_spec.rb

13 lines
337 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe PreviewCard do
describe 'Validations' do
describe 'url' do
it { is_expected.to allow_values('http://example.host/path', 'https://example.host/path').for(:url) }
it { is_expected.to_not allow_value('javascript:alert()').for(:url) }
end
end
end