Merge pull request #9269 from mfo/US/text-merge-fork-with-revision-removing-repetition
Test: merge_fork d'un dossier étant sur une revision passée avec une répétition qui a été supprimée
This commit is contained in:
commit
c83cc048c6
1 changed files with 17 additions and 0 deletions
|
@ -341,5 +341,22 @@ RSpec.describe DossierCloneConcern do
|
|||
expect(Dossier.exists?(forked_dossier.id)).to be_falsey
|
||||
end
|
||||
end
|
||||
|
||||
context 'with old revision having repetition' do
|
||||
let(:added_champ) { nil }
|
||||
let(:removed_champ) { dossier.champs.find(&:repetition?) }
|
||||
let(:updated_champ) { nil }
|
||||
|
||||
before do
|
||||
dossier.champs.each do |champ|
|
||||
champ.update(value: 'old value')
|
||||
end
|
||||
procedure.draft_revision.remove_type_de_champ(removed_champ.stable_id)
|
||||
procedure.publish_revision!
|
||||
end
|
||||
it 'works' do
|
||||
expect { subject }.not_to raise_error(ActiveRecord::InvalidForeignKey)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue