refactor(procedure): types_de_champ -> active_revision.types_de_champ_public
This commit is contained in:
parent
0e3d904b5f
commit
29bdd82b59
23 changed files with 91 additions and 94 deletions
|
@ -43,7 +43,7 @@ describe API::V1::ProceduresController, type: :controller do
|
|||
describe 'type_de_champ' do
|
||||
subject { super()[:types_de_champ][0] }
|
||||
|
||||
let(:champ) { procedure.types_de_champ.first }
|
||||
let(:champ) { procedure.active_revision.types_de_champ_public.first }
|
||||
|
||||
it { expect(subject[:id]).to eq(champ.id) }
|
||||
it { expect(subject[:libelle]).to eq(champ.libelle) }
|
||||
|
|
|
@ -148,7 +148,7 @@ describe API::V2::GraphqlController do
|
|||
draftRevision: { id: procedure.draft_revision.to_typed_id },
|
||||
publishedRevision: {
|
||||
id: procedure.published_revision.to_typed_id,
|
||||
champDescriptors: procedure.published_types_de_champ.map do |tdc|
|
||||
champDescriptors: procedure.published_revision.types_de_champ_public.map do |tdc|
|
||||
{
|
||||
type: tdc.type_champ
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ describe API::V2::GraphqlController do
|
|||
typeOrganisme: procedure.service.type_organisme,
|
||||
organisme: procedure.service.organisme
|
||||
},
|
||||
champDescriptors: procedure.types_de_champ.map do |tdc|
|
||||
champDescriptors: procedure.active_revision.types_de_champ_public.map do |tdc|
|
||||
{
|
||||
id: tdc.to_typed_id,
|
||||
label: tdc.libelle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue