Sha256: 7b507fad4c3c061c1b44b4958fe6ac0c134a83b7937f701a7632a2f92b5d5bad

Contents?: true

Size: 530 Bytes

Versions: 86

Compression:

Stored size: 530 Bytes

Contents

require 'rails_helper'

describe LHS::Record do
  before(:each) do
    class Record < LHS::Record
      endpoint 'http://datastore/records/'
    end
    stub_request(:get, "http://datastore/records/?limit=1&name=Steve&color=blue")
      .to_return(body: [{ name: 'Steve', color: 'blue' }].to_json)
  end

  it 'allows chaining find_by' do
    Record.options(params: { color: 'blue' }).find_by(name: 'Steve')
  end

  it 'allows chaining find_by!' do
    Record.options(params: { color: 'blue' }).find_by!(name: 'Steve')
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
lhs-15.3.1 spec/record/find_by_chains_spec.rb
lhs-15.3.1.pre.fixlhc.1 spec/record/find_by_chains_spec.rb
lhs-15.3.0 spec/record/find_by_chains_spec.rb
lhs-15.2.5 spec/record/find_by_chains_spec.rb
lhs-15.2.4 spec/record/find_by_chains_spec.rb
lhs-15.2.3 spec/record/find_by_chains_spec.rb
lhs-15.2.3.pre.favorites.1 spec/record/find_by_chains_spec.rb
lhs-15.2.2.pre.favorites.1 spec/record/find_by_chains_spec.rb
lhs-15.2.2 spec/record/find_by_chains_spec.rb
lhs-15.2.1 spec/record/find_by_chains_spec.rb
lhs-15.2.0 spec/record/find_by_chains_spec.rb
lhs-15.1.1 spec/record/find_by_chains_spec.rb
lhs-15.1.0 spec/record/find_by_chains_spec.rb
lhs-15.0.2 spec/record/find_by_chains_spec.rb
lhs-15.0.1 spec/record/find_by_chains_spec.rb
lhs-15.0.0 spec/record/find_by_chains_spec.rb
lhs-14.6.5 spec/record/find_by_chains_spec.rb
lhs-14.6.4 spec/record/find_by_chains_spec.rb
lhs-14.6.3 spec/record/find_by_chains_spec.rb
lhs-14.6.2 spec/record/find_by_chains_spec.rb