Skip to content

Commit

Permalink
♻️ Renvoyer le type en cohérence avec la modélisation de données côté…
Browse files Browse the repository at this point in the history
… front
  • Loading branch information
marouria committed Sep 11, 2024
1 parent 23c7f0c commit 0a3495b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/question_glisser_deposer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def as_json(_options = nil)

def base_json
slice(:id, :nom_technique, :description).tap do |json|
json['type'] = 'glisser_deposer_billets'
json['type'] = 'glisser-deposer-billets'
json['illustration'] = cdn_for(illustration) if illustration.attached?
json['modalite_reponse'] = transcription_modalite_reponse&.ecrit
json['intitule'] = transcription_intitule&.ecrit
Expand Down
2 changes: 1 addition & 1 deletion spec/models/question_glisser_deposer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
expect(json.keys).to match_array(%w[id intitule audio_url nom_technique
description illustration modalite_reponse type
reponsesNonClassees])
expect(json['type']).to eql('glisser_deposer_billets')
expect(json['type']).to eql('glisser-deposer-billets')
expect(json['intitule']).to eql('Mon Intitulé')
expect(json['modalite_reponse']).to eql(modalite.ecrit)
expect(json['illustration']).to eql(Rails.application.routes.url_helpers.url_for(
Expand Down

0 comments on commit 0a3495b

Please sign in to comment.