chore(dossier): remove legacy update attributes

This commit is contained in:
Paul Chavard 2024-03-28 12:42:29 +01:00
parent 8431771a61
commit 1bca3c123b
No known key found for this signature in database
27 changed files with 50 additions and 245 deletions

View file

@ -675,11 +675,9 @@ describe Users::DossiersController, type: :controller do
groupe_instructeur_id: dossier.groupe_instructeur_id,
champs_public_attributes: {
first_champ.public_id => {
with_public_id: true,
value: value
},
piece_justificative_champ.public_id => {
with_public_id: true,
piece_justificative_file: file
}
}
@ -713,22 +711,6 @@ describe Users::DossiersController, type: :controller do
expect(dossier.reload.updated_at.year).to eq(2100)
expect(dossier.reload.state).to eq(Dossier.states.fetch(:brouillon))
end
context 'without new values for champs' do
let(:submit_payload) do
{
id: dossier.id,
dossier: {
champs_public_attributes: { first_champ.public_id => { with_public_id: true } }
}
}
end
it "doesn't set last_champ_updated_at" do
subject
expect(dossier.reload.last_champ_updated_at).to eq(nil)
end
end
end
context 'when the user has an invitation but is not the owner' do
@ -747,7 +729,7 @@ describe Users::DossiersController, type: :controller do
{
id: dossier.id,
dossier: {
champs_public_attributes: { first_champ.public_id => { with_public_id: true, value: value } }
champs_public_attributes: { first_champ.public_id => { value: value } }
}
}
end
@ -801,11 +783,9 @@ describe Users::DossiersController, type: :controller do
groupe_instructeur_id: dossier.groupe_instructeur_id,
champs_public_attributes: {
first_champ.public_id => {
with_public_id: true,
value: value
},
piece_justificative_champ.public_id => {
with_public_id: true,
piece_justificative_file: file
}
}
@ -866,7 +846,6 @@ describe Users::DossiersController, type: :controller do
dossier: {
champs_public_attributes: {
piece_justificative_champ.public_id => {
with_public_id: true,
piece_justificative_file: file
}
}
@ -962,7 +941,6 @@ describe Users::DossiersController, type: :controller do
dossier: {
champs_public_attributes: {
first_champ.public_id => {
with_public_id: true,
value: value
}
}