Sha256: 0dd7b28f8a38cce79347ea10f7e92174fdbc9ca1c5397b0c7314eb35e957f9eb
Contents?: true
Size: 536 Bytes
Versions: 5
Compression:
Stored size: 536 Bytes
Contents
require 'rails_helper' describe LHC do context 'request' do let(:total) { 99 } before(:each) do stub_request(:get, "http://datastore/v2/feedbacks?has_reviews=true") .to_return(status: 200, body: { total: total }.to_json, headers: { 'Content-Encoding' => 'UTF-8' }) end it 'does a request returning a response' do response = described_class.request(url: 'http://datastore/v2/feedbacks', params: { has_reviews: true }, method: :get) expect(response.data.total).to eq total end end end
Version data entries
5 entries across 5 versions & 1 rubygems