spec/rest/orders_spec.rb in finapps-2.2.21 vs spec/rest/orders_spec.rb in finapps-2.2.22
- old
+ new
@@ -78,10 +78,10 @@
let(:params) { {page: 2, sort: 'status'} }
it { expect { subject }.not_to raise_error }
it('returns an array') { expect(subject).to be_a(Array) }
it('performs a get and returns the response') { expect(subject[RESULTS]).to respond_to(:orders) }
- it('each order contains a consumer_id') { expect(subject[RESULTS].orders).to all(respond_to(:consumer_id)) }
+ it('each order contains a consumer_id') { expect(subject[RESULTS].orders).to all(have_key('consumer_id')) }
it('returns no error messages') { expect(subject[ERROR_MESSAGES]).to be_empty }
it 'sends proper request' do
subject
url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v2/orders?page=2&sort=status"
expect(WebMock).to have_requested(:get, url)