demarches-normaliennes/spec/lib/api_geo/api_spec.rb

22 lines
521 B
Ruby
Raw Normal View History

2016-12-16 10:42:34 +01:00
require 'spec_helper'
2018-10-15 21:01:37 +02:00
describe ApiGeo::API do
2018-10-15 16:30:27 +02:00
describe '.regions', vcr: { cassette_name: 'api_geo_regions' } do
2016-12-16 10:42:34 +01:00
subject { described_class.regions }
it { expect(subject.code).to eq 200 }
end
2018-10-15 16:30:27 +02:00
describe '.departements', vcr: { cassette_name: 'api_geo_departements' } do
2016-12-16 10:42:34 +01:00
subject { described_class.departements }
it { expect(subject.code).to eq 200 }
end
describe '.pays' do
subject { described_class.pays }
2018-10-15 16:30:27 +02:00
it { is_expected.to eq File.open('app/lib/api_geo/pays.json').read }
2016-12-16 10:42:34 +01:00
end
2017-04-04 15:27:04 +02:00
end