This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/spec/helpers/http_helper_spec.rb
2017-05-29 18:02:32 +02:00

14 lines
440 B
Ruby

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