spec/sitehub/downstream_client_spec.rb in sitehub-0.5.0.alpha7 vs spec/sitehub/downstream_client_spec.rb in sitehub-0.5.0.alpha8

- old
+ new

@@ -43,9 +43,18 @@ subject.call(request) assert_requested http_method, current_version_url, body: body end end + context 'query string' do + let(:params) { { 'key' => 'value' } } + let(:env) { env_for(path: mapped_path, params_or_body: params) } + it 'preserves the query string when forwarding the request' do + stub_request(http_method, current_version_url).with(query: params) + subject.call(request) + end + end + it 'preserves the headers when forwarding request' do http_headers['HTTP_HEADER'] = 'value' subject.call(request) assert_requested http_method, current_version_url, headers: { 'Header' => 'value' } end