Revert "Remove data_provide
and data_date_format
attributes"
This reverts commit 273b3f2faf
.
This commit is contained in:
parent
ccad372036
commit
469aca999b
11 changed files with 51 additions and 16 deletions
|
@ -26,6 +26,28 @@ shared_examples 'champ_spec' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'data_provide' do
|
||||
let(:champ) { create :champ }
|
||||
|
||||
subject { champ.data_provide }
|
||||
|
||||
context 'when type_champ is datetime' do
|
||||
before do
|
||||
champ.type_de_champ = create :type_de_champ_public, type_champ: 'datetime'
|
||||
end
|
||||
|
||||
it { is_expected.to eq 'datepicker' }
|
||||
end
|
||||
|
||||
context 'when type_champ is address' do
|
||||
before do
|
||||
champ.type_de_champ = create :type_de_champ_public, type_champ: 'address'
|
||||
end
|
||||
|
||||
it { is_expected.to eq 'typeahead' }
|
||||
end
|
||||
end
|
||||
|
||||
describe '.departement', vcr: { cassette_name: 'call_geo_api_departements' } do
|
||||
subject { Champ.departements }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue