Sha256: fa303dacaef0353b8229868030eb9d301ef6887cd80d629dda8ed74e5f4d3b16
Contents?: true
Size: 756 Bytes
Versions: 19
Compression:
Stored size: 756 Bytes
Contents
require 'rails_helper' describe LHS::Item do context 'make errors available' do before do class Presence < LHS::Record endpoint 'http://opm/presences' end end let(:place_href) { 'http://datastore/places/1' } it 'makes errors available no matter the response code' do stub_request(:post, "http://opm/presences") .to_return( status: 200, body: { place: { href: place_href }, field_errors: [{ code: 'REQUIRED_PROPERTY_VALUE', path: ['place', 'opening_hours'] }] }.to_json ) presence = Presence.create(place: { href: place_href }) expect(presence.errors.any?).to be true end end end
Version data entries
19 entries across 19 versions & 1 rubygems