Sha256: d5a4314879f44df190b84730f95717b550d43b319bb32e7afbce1779ae528549
Contents?: true
Size: 700 Bytes
Versions: 29
Compression:
Stored size: 700 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe LHC do include ActionDispatch::TestProcess context 'form' do it 'formats requests to be application/x-www-form-urlencoded' do stub = stub_request(:post, 'http://local.ch/') .with(body: 'client_id=1234&client_secret=4567&grant_type=client_credentials') .with(headers: { 'Content-Type': 'application/x-www-form-urlencoded' }) .to_return(status: 200) LHC.form.post( 'http://local.ch', body: { client_id: '1234', client_secret: '4567', grant_type: 'client_credentials' } ) expect(stub).to have_been_requested end end end
Version data entries
29 entries across 29 versions & 1 rubygems