Remove data_provide
and data_date_format
attributes
This commit is contained in:
parent
6f76c1b5fb
commit
273b3f2faf
11 changed files with 16 additions and 51 deletions
|
@ -26,28 +26,6 @@ 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 }
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ describe 'users/description/show.html.haml', type: :view do
|
|||
end
|
||||
|
||||
describe 'datetime value is correctly setup when is not nil' do
|
||||
it { expect(rendered).to have_css("input[type='datetime'][id='champs_#{champ_datetime.id}'][value='22/06/2016']") }
|
||||
it { expect(rendered).to have_css("input[type='date'][id='champs_#{champ_datetime.id}'][value='22/06/2016']") }
|
||||
it { expect(rendered).to have_css("option[value='12'][selected='selected']") }
|
||||
it { expect(rendered).to have_css("option[value='05'][selected='selected']") }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue