spec/keikoku/client_spec.rb in keikokuc-0.6 vs spec/keikoku/client_spec.rb in keikokuc-0.7
- old
+ new
@@ -19,10 +19,10 @@
expect(error).to be_nil
end
it 'handles invalid notifications' do
ShamRack.at('keikoku.herokuapp.com', 443) do |env|
- [422, {}, StringIO.new(Yajl::Encoder.encode({ :errors => :srorre }))]
+ [422, {}, StringIO.new(OkJson.encode({ 'errors' => 'srorre' }))]
end
response, error = Client.new.post_notification({})
expect(error).to be Client::InvalidNotification
expect(response[:errors]).to eq('srorre')