Sha256: a3c5755e50652ce1cdbaecc7cf19181a08c2df73f0c85d397610faf338f27139
Contents?: true
Size: 671 Bytes
Versions: 12
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Record do before do class Record < DHS::Record endpoint 'http://datastore/records/' endpoint 'http://datastore/records/{id}' end end context 'href_for' do it 'injects variables and returns href' do expect(Record.href_for(1)).to eq 'http://datastore/records/1' expect(Record.href_for('vmasd241')).to eq 'http://datastore/records/vmasd241' end it 'also works with url_for (alias)' do expect(Record.url_for(1)).to eq 'http://datastore/records/1' expect(Record.url_for('vmasd241')).to eq 'http://datastore/records/vmasd241' end end end
Version data entries
12 entries across 12 versions & 1 rubygems