spec: add test case

This commit is contained in:
simon lehericey 2022-05-06 15:58:19 +02:00
parent b889d18217
commit 285f402483

View file

@ -135,6 +135,14 @@ describe ProcedureRevision do
expect { child.reload }.to raise_error ActiveRecord::RecordNotFound
expect(draft.types_de_champ_public.size).to eq(1)
end
it 'can remove the parent' do
draft.remove_type_de_champ(type_de_champ_repetition.stable_id)
expect { child.reload }.to raise_error ActiveRecord::RecordNotFound
expect { type_de_champ_repetition.reload }.to raise_error ActiveRecord::RecordNotFound
expect(draft.types_de_champ_public).to be_empty
end
end
end