chore(create_procedure_presentation): homogénéise l'interface sur les procédure présentation. pas d'objet 'build', sinon les export/filtres deviennent compliqués
This commit is contained in:
parent
50c43f4819
commit
5ced9fb431
4 changed files with 13 additions and 6 deletions
|
@ -8,7 +8,7 @@ describe AssignTo, type: :model do
|
|||
let(:errors) { procedure_presentation_and_errors.second }
|
||||
|
||||
context "without a procedure_presentation" do
|
||||
it { expect(procedure_presentation_or_default).not_to be_persisted }
|
||||
it { expect(procedure_presentation_or_default).to be_persisted }
|
||||
it { expect(procedure_presentation_or_default).to be_valid }
|
||||
it { expect(errors).to be_nil }
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ describe AssignTo, type: :model do
|
|||
pp
|
||||
end
|
||||
|
||||
it { expect(procedure_presentation_or_default).not_to be_persisted }
|
||||
it { expect(procedure_presentation_or_default).to be_persisted }
|
||||
it { expect(procedure_presentation_or_default).to be_valid }
|
||||
it { expect(errors).to be_present }
|
||||
it do
|
||||
|
|
|
@ -169,14 +169,17 @@ describe Instructeur, type: :model do
|
|||
pp.save(:validate => false)
|
||||
end
|
||||
|
||||
it { expect(procedure_presentation).not_to be_persisted }
|
||||
it 'recreates a valid prsentation' do
|
||||
expect(procedure_presentation).to be_persisted
|
||||
end
|
||||
it { expect(procedure_presentation).to be_valid }
|
||||
it { expect(errors).to be_present }
|
||||
end
|
||||
|
||||
context 'with default presentation' do
|
||||
let(:procedure_id) { procedure_2.id }
|
||||
|
||||
it { expect(procedure_presentation).not_to be_persisted }
|
||||
it { expect(procedure_presentation).to be_persisted }
|
||||
it { expect(errors).to be_nil }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue