闭社主体 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
405 B

  1. require 'rails_helper'
  2. RSpec.describe FetchLinkCardService do
  3. before do
  4. stub_request(:get, 'http://example.xn--fiqs8s/').to_return(request_fixture('idn.txt'))
  5. end
  6. it 'works with IDN URLs' do
  7. status = Fabricate(:status, text: 'Check out http://example.中国')
  8. FetchLinkCardService.new.call(status)
  9. expect(a_request(:get, 'http://example.xn--fiqs8s/')).to have_been_made
  10. end
  11. end