|
63 | 63 | "submitted_at" => "2022-09-14T07:00:00.000Z", |
64 | 64 | "answers" => [ |
65 | 65 | { |
66 | | - "question_id" => text_step.form_document_step.id, |
| 66 | + "question_id" => text_step.id, |
67 | 67 | "question_text" => "What is the meaning of life?", |
68 | 68 | "answer_text" => text_question.text, |
69 | 69 | }, |
70 | 70 | { |
71 | | - "question_id" => name_step.form_document_step.id, |
| 71 | + "question_id" => name_step.id, |
72 | 72 | "question_text" => "What is your name?", |
73 | 73 | "first_name" => name_question.first_name, |
74 | 74 | "last_name" => name_question.last_name, |
75 | 75 | "answer_text" => name_question.show_answer, |
76 | 76 | }, |
77 | 77 | { |
78 | | - "question_id" => file_step.form_document_step.id, |
| 78 | + "question_id" => file_step.id, |
79 | 79 | "question_text" => "Upload a file", |
80 | 80 | "answer_text" => "test_#{submission_reference}.txt", |
81 | 81 | }, |
82 | 82 | { |
83 | | - "question_id" => address_step.form_document_step.id, |
| 83 | + "question_id" => address_step.id, |
84 | 84 | "question_text" => "What is your address?", |
85 | 85 | "address1" => address_question.address1, |
86 | 86 | "address2" => "", |
|
90 | 90 | "answer_text" => address_question.show_answer, |
91 | 91 | }, |
92 | 92 | { |
93 | | - "question_id" => selection_step.form_document_step.id, |
| 93 | + "question_id" => selection_step.id, |
94 | 94 | "question_text" => "Select your options", |
95 | 95 | "selections" => ["Option 1", "Option 2"], |
96 | 96 | "answer_text" => "Option 1, Option 2", |
|
115 | 115 | "submitted_at" => "2022-09-14T07:00:00.000Z", |
116 | 116 | "answers" => [ |
117 | 117 | { |
118 | | - "question_id" => repeatable_step.form_document_step.id, |
| 118 | + "question_id" => repeatable_step.id, |
119 | 119 | "question_text" => "What is the meaning of life?", |
120 | 120 | "can_have_multiple_answers" => true, |
121 | 121 | "answer_text" => [first_answer.text, second_answer.text], |
122 | 122 | }, |
123 | 123 | { |
124 | | - "question_id" => name_step.form_document_step.id, |
| 124 | + "question_id" => name_step.id, |
125 | 125 | "question_text" => "What is your name?", |
126 | 126 | "first_name" => name_question.first_name, |
127 | 127 | "last_name" => name_question.last_name, |
|
148 | 148 |
|
149 | 149 | it "generates JSON without including the submission reference in the filename for the file upload question" do |
150 | 150 | expect(parsed_json["answers"]).to include({ |
151 | | - "question_id" => file_step.form_document_step.id, |
| 151 | + "question_id" => file_step.id, |
152 | 152 | "question_text" => "Upload a file", |
153 | 153 | "answer_text" => "test.txt", |
154 | 154 | }) |
|
0 commit comments