Improve rna champ tests
This commit is contained in:
parent
e694ff1f60
commit
fa1f0fc240
3 changed files with 8 additions and 10 deletions
|
@ -12,7 +12,7 @@ describe APIEducation::AnnuaireEducationAdapter do
|
|||
let(:body) { File.read('spec/fixtures/files/api_education/annuaire_education.json') }
|
||||
let(:status) { 200 }
|
||||
|
||||
it '#to_params return vaid hash' do
|
||||
it '#to_params return valid hash' do
|
||||
expect(subject).to be_an_instance_of(Hash)
|
||||
expect(subject['identifiant_de_l_etablissement']).to eq(search_term)
|
||||
expect(subject['code_type_contrat_prive']).to eq(99)
|
||||
|
@ -23,7 +23,7 @@ describe APIEducation::AnnuaireEducationAdapter do
|
|||
let(:body) { File.read('spec/fixtures/files/api_education/annuaire_education_bug.json') }
|
||||
let(:status) { 200 }
|
||||
|
||||
it '#to_params return vaid hash' do
|
||||
it '#to_params return valid hash' do
|
||||
expect(subject).to be_an_instance_of(Hash)
|
||||
expect(subject['identifiant_de_l_etablissement']).to eq(search_term)
|
||||
expect(subject['code_type_contrat_prive']).to eq(99)
|
||||
|
|
|
@ -24,7 +24,7 @@ describe APIEntreprise::RNAAdapter do
|
|||
let(:body) { File.read('spec/fixtures/files/api_entreprise/associations.json') }
|
||||
let(:status) { 200 }
|
||||
|
||||
it '#to_params return vaid hash' do
|
||||
it '#to_params return valid hash' do
|
||||
expect(subject).to be_an_instance_of(Hash)
|
||||
expect(subject["association_rna"]).to eq('W595001988')
|
||||
expect(subject["association_titre"]).to eq('UN SUR QUATRE')
|
||||
|
|
|
@ -2,13 +2,11 @@ describe Champs::RNAChamp do
|
|||
let(:champ) { create(:champ_rna, value: "W182736273") }
|
||||
|
||||
describe '#valid?' do
|
||||
it do
|
||||
expect(build(:champ_rna, value: nil)).to be_valid
|
||||
expect(build(:champ_rna, value: "2736251627")).to_not be_valid
|
||||
expect(build(:champ_rna, value: "A172736283")).to_not be_valid
|
||||
expect(build(:champ_rna, value: "W1827362718")).to_not be_valid
|
||||
expect(build(:champ_rna, value: "W182736273")).to be_valid
|
||||
end
|
||||
it { expect(build(:champ_rna, value: nil)).to be_valid }
|
||||
it { expect(build(:champ_rna, value: "2736251627")).to_not be_valid }
|
||||
it { expect(build(:champ_rna, value: "A172736283")).to_not be_valid }
|
||||
it { expect(build(:champ_rna, value: "W1827362718")).to_not be_valid }
|
||||
it { expect(build(:champ_rna, value: "W182736273")).to be_valid }
|
||||
end
|
||||
|
||||
describe "#export" do
|
||||
|
|
Loading…
Reference in a new issue