Sha256: 2d8a47614bb0f5077a01752322a9d48ea3fda9f846cbd1e7f6c4e175b9d42140
Contents?: true
Size: 600 Bytes
Versions: 8
Compression:
Stored size: 600 Bytes
Contents
require 'rails_helper' describe LHS::Record do before 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
8 entries across 8 versions & 1 rubygems