Sha256: a0936d011375f9f6e592fface319c3c0fb96f981e4f72f495ea027baee560578

Contents?: true

Size: 509 Bytes

Versions: 12

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe DHS::Record do
  context 'options' do
    before do
      class Record < DHS::Record
        endpoint 'http://depay.fi/records'
      end
    end

    let(:raw) do
      { options: { criticality: :high } }
    end

    def record
      DHS::Record.new DHS::Data.new(raw, nil, Record)
    end

    it 'is possible to fetch data from a key called options from an instance' do
      expect(record.options.criticality).to eq :high
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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