Sha256: f0f83eedca21ce0c4a0f6ec1d171ced9a7060a007d278bbe7b38a32c4275b05f
Contents?: true
Size: 477 Bytes
Versions: 12
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Record do before do class Record < DHS::Record endpoint 'http://datastore/records' end end let(:item) { { name: 'Thomas' } } let(:body) { [item] } it 'converts itself to hash' do stub_request(:get, 'http://datastore/records') .to_return(body: body.to_json) record = Record.where.first expect(record.to_h).to eq item expect(record.to_hash).to eq item end end
Version data entries
12 entries across 12 versions & 1 rubygems