spec/rest/portfolios_consumers_spec.rb in finapps-5.0.2 vs spec/rest/portfolios_consumers_spec.rb in finapps-5.0.3

- old
+ new

@@ -43,11 +43,11 @@ it('returns an array') { expect(list).to be_a(Array) } it('performs a get and returns the response') { expect(results).to respond_to(:records) } it('returns no error messages') { expect(errors).to be_empty } it 'builds query and sends proper request' do list - url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v3/portfolios/#{portfolio_id}/consumers?page=2&" \ + url = "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers?page=2&" \ 'requested=25&sort=-created_date' expect(WebMock).to have_requested(:get, url) end end @@ -91,11 +91,11 @@ it('returns an array') { expect(create).to be_a(Array) } it('results is nil') { expect(results).to be_nil } it('returns no error messages') { expect(errors).to be_empty } it('builds correct url') do create - url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v3/portfolios/#{portfolio_id}/consumers" + url = "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers" expect(WebMock).to have_requested(:post, url) end end context 'when invalid id and params are provided' do @@ -120,10 +120,10 @@ it('returns an array') { expect(create).to be_a(Array) } it('results is nil') { expect(results).to be_nil } it('returns no error messages') { expect(errors).to be_empty } it('builds correct url') do create - url = "#{FinAppsCore::REST::Defaults::DEFAULTS[:host]}/v3/portfolios/#{portfolio_id}/consumers/#{params}" + url = "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers/#{params}" expect(WebMock).to have_requested(:post, url) end end context 'when invalid ids are provided' do