Sha256: 22848c0f9b5931ae90113522d813f63dea7b2abeae911d55ee84ae366dc77a94
Contents?: true
Size: 607 Bytes
Versions: 44
Compression:
Stored size: 607 Bytes
Contents
require 'rails_helper' describe LHS::Record do before(:each) do class Record < LHS::Record endpoint 'http://datastore/records/' end end context 'fetch' do let!(:request_stub) do stub_request(:get, "http://datastore/records/?available=true&color=blue&range=%3E26") .to_return(body: [{ name: 'Steve' }].to_json) end it 'resolves chains' do records = Record.where(color: 'blue').where(range: '>26', available: true).fetch expect(request_stub).to have_been_requested expect(records.first.name).to eq 'Steve' end end end
Version data entries
44 entries across 44 versions & 1 rubygems