Sha256: 32421112841eddca2ea0ea3468c8818d30b4bddd05cfc969c4dcabce5a523ab0
Contents?: true
Size: 567 Bytes
Versions: 48
Compression:
Stored size: 567 Bytes
Contents
require 'rails_helper' describe LHC::Request do context 'encoding url' do let(:url) { 'http://local.ch/something with spaces' } it 'can request urls with spaces inside' do stub_request(:get, URI.encode(url)) LHC.get(url) end end context 'encoding params' do let(:url) { 'http://local.ch/api/search?name=:name' } it 'can do requests with params including spaces' do stub_request(:get, 'http://local.ch/api/search?name=My%20name%20is%20rabbit') LHC.get(url, params: { name: 'My name is rabbit' }) end end end
Version data entries
48 entries across 48 versions & 1 rubygems