mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Spec HttpHelper (#3416)
This commit is contained in:
parent
7a281c477a
commit
c8a226f61c
13
spec/helpers/http_helper_spec.rb
Normal file
13
spec/helpers/http_helper_spec.rb
Normal file
@ -0,0 +1,13 @@
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user