spec/errors_spec.rb in govdelivery-tms-0.8.10 vs spec/errors_spec.rb in govdelivery-tms-0.8.11
- old
+ new
@@ -1,13 +1,15 @@
require 'spec_helper'
describe GovDelivery::TMS::Errors do
context 'an errors hash' do
let(:object_with_errors) do
- double('instance', href: 'href', errors: { 'body' => ["can't be blank"], 'subject' => ["can't be blank"] })
+ double('instance', href: 'href', errors: {'body' => ["can't be blank"], 'subject' => ["can't be blank"]})
end
subject { GovDelivery::TMS::Errors::InvalidVerb.new(object_with_errors) }
it 'should work' do
+ expect(subject.message).to match(/Couldn't POST/)
expect(subject.message).to match(/body can't be blank, subject can't be blank/)
+ expect(subject.error_message).to match(/body can't be blank, subject can't be blank/)
end
end
end