闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
419 B

require 'rails_helper'
RSpec.describe FetchLinkCardService do
before do
stub_request(:get, 'http://example.xn--fiqs8s/').to_return(request_fixture('idn.txt'))
end
it 'works with IDN URLs' do
status = Fabricate(:status, text: 'Check out http://example.中国')
FetchLinkCardService.new.call(status)
expect(a_request(:get, 'http://example.xn--fiqs8s/')).to have_been_made.at_least_once
end
end