Sha256: 947faf13f941be3c107e3d8410c7fe30721bf2715d7a3b24766beb053269c8dc
Contents?: true
Size: 995 Bytes
Versions: 19
Compression:
Stored size: 995 Bytes
Contents
require 'rails_helper' describe LHS::Record do before do class Business < LHS::Record configuration item_created_key: [:response, :business], limit_key: [:response, :max], pagination_key: [:response, :offset], total_key: [:response, :count], pagination_strategy: :offset endpoint 'http://uberall/businesses' end end let(:stub_create_business_request) do stub_request(:post, "http://uberall/businesses") .to_return(body: { status: "SUCCESS", response: { business: { identifier: 'ABC123', name: 'localsearch', id: 239650 } } }.to_json) end it 'uses paths from configuration to access nested values' do stub_create_business_request business = Business.create!( identifier: 'ABC123', name: 'localsearch' ) expect(business.identifier).to eq 'ABC123' expect(business.name).to eq 'localsearch' expect(business.id).to eq 239650 end end
Version data entries
19 entries across 19 versions & 1 rubygems