Sha256: 4d811351451e8b308f77ab680e18831972f7b192fd4875baeba6e8a9ab834d78

Contents?: true

Size: 442 Bytes

Versions: 12

Compression:

Stored size: 442 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe DHS::Data do
  let(:raw) do
    { labels: { de: %w[cat dog] } }
  end

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

  before do
    class Record < DHS::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

12 entries across 12 versions & 1 rubygems

Version Path
dhs-1.6.0 spec/data/select_spec.rb
dhs-1.5.0 spec/data/select_spec.rb
dhs-1.4.2 spec/data/select_spec.rb
dhs-1.4.1 spec/data/select_spec.rb
dhs-1.4.0 spec/data/select_spec.rb
dhs-1.3.0 spec/data/select_spec.rb
dhs-1.2.0 spec/data/select_spec.rb
dhs-1.1.0 spec/data/select_spec.rb
dhs-1.0.3 spec/data/select_spec.rb
dhs-1.0.2 spec/data/select_spec.rb
dhs-1.0.1 spec/data/select_spec.rb
dhs-1.0.0 spec/data/select_spec.rb