Sha256: 10d4f636978a733908717609e2f43094884e4afad6e1b391a5b189b9131db388
Contents?: true
Size: 672 Bytes
Versions: 50
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe LHS::Record do before do class Record < LHS::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
50 entries across 50 versions & 1 rubygems