Group API Adresse mock responses in a folder

This commit is contained in:
gregoirenovel 2018-10-15 17:00:59 +02:00
parent bfa2d5748d
commit 7ae5e8ce52
3 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ require 'spec_helper'
describe ApiAdresse::AddressRetriever do
describe '#list' do
let(:request) { 'Paris' }
let(:response) { File.open('spec/support/files/ban_address_search.json') }
let(:response) { File.open('spec/support/files/api_adresse/search_results.json') }
let(:status) { 200 }
subject { described_class.new(request).list }
@ -19,7 +19,7 @@ describe ApiAdresse::AddressRetriever do
end
context 'when address return an empty list' do
let(:response) { File.open('spec/support/files/ban_address_search_no_result.json') }
let(:response) { File.open('spec/support/files/api_adresse/search_no_results.json') }
it { expect(subject.size).to eq 0 }
it { is_expected.to be_an_instance_of Array }