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

13 lines
440 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe HttpHelper do
  4. describe 'http_client' do
  5. it 'returns HTTP::Client with default options' do
  6. options = helper.http_client.default_options
  7. expect(options.headers['User-Agent']).to match /.+ \(Mastodon\/.+;\ \+http:\/\/cb6e6126\.ngrok\.io\/\)/
  8. expect(options.timeout_options).to eq read_timeout: 10, write_timeout: 10, connect_timeout: 10
  9. end
  10. end
  11. end