Sha256: 5bb4bd4b319c90056fb5b294212196656515a471eaabf34378df90ef5a47ab10

Contents?: true

Size: 414 Bytes

Versions: 19

Compression:

Stored size: 414 Bytes

Contents

require 'rails_helper'

describe LHS::Data do
  let(:raw) do
    { labels: { de: ['cat', 'dog'] } }
  end

  let(:data) do
    LHS::Data.new(raw, nil, Record)
  end

  before do
    class Record < LHS::Record
      endpoint '{+datastore}/v2/data'
    end
  end

  context 'select' do
    it 'works with select' do
      expect(
        data.labels.de.select { |x| x }.join
      ).to eq 'catdog'
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
lhs-16.1.5 spec/data/select_spec.rb
lhs-16.1.4 spec/data/select_spec.rb
lhs-16.1.3 spec/data/select_spec.rb
lhs-16.1.2 spec/data/select_spec.rb
lhs-16.1.1 spec/data/select_spec.rb
lhs-16.1.0 spec/data/select_spec.rb
lhs-16.0.1 spec/data/select_spec.rb
lhs-16.0.0 spec/data/select_spec.rb
lhs-15.7.0 spec/data/select_spec.rb
lhs-15.6.1 spec/data/select_spec.rb
lhs-15.6.0 spec/data/select_spec.rb
lhs-15.5.1 spec/data/select_spec.rb
lhs-15.5.0 spec/data/select_spec.rb
lhs-15.4.1 spec/data/select_spec.rb
lhs-15.4.0 spec/data/select_spec.rb
lhs-15.4.0.pre.hasone.1 spec/data/select_spec.rb
lhs-15.3.3 spec/data/select_spec.rb
lhs-15.3.3.pre.fixoptions.1 spec/data/select_spec.rb
lhs-15.3.2 spec/data/select_spec.rb