|
146 | 146 | it "displays the case contact type" do |
147 | 147 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
148 | 148 |
|
149 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 149 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
150 | 150 |
|
151 | 151 | expect(table_data).to include(/#{document_data[:case_contact_type]}.*/) |
152 | 152 | end |
153 | 153 |
|
154 | 154 | it "displays the case contact time date formatted" do |
155 | 155 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
156 | 156 |
|
157 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 157 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
158 | 158 |
|
159 | 159 | expect(table_data).to include(/#{document_data[:case_contact_time].strftime("%-m/%d")}.*/) |
160 | 160 | end |
161 | 161 |
|
162 | 162 | it "displays the text" do |
163 | 163 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
164 | 164 |
|
165 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 165 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
166 | 166 |
|
167 | 167 | expect(table_data).to include(/#{document_data[:text]}.*/) |
168 | 168 | end |
169 | 169 |
|
170 | 170 | it "displays the order status" do |
171 | | - docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
| 171 | + docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
172 | 172 |
|
173 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 173 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
174 | 174 |
|
175 | 175 | expect(table_data).to include("Partially implemented") |
176 | 176 | end |
177 | 177 |
|
178 | 178 | it "displays the volunteer name" do |
179 | 179 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
180 | 180 |
|
181 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 181 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
182 | 182 |
|
183 | 183 | expect(table_data).to include(/#{document_data[:volunteer_name]}.*/) |
184 | 184 | end |
185 | 185 |
|
186 | 186 | it "displays the volunteer case assignment date formatted" do |
187 | 187 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
188 | 188 |
|
189 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 189 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
190 | 190 |
|
191 | 191 | expect(table_data).to include(/#{document_data[:volunteer_case_assignment_date].strftime("%B %-d, %Y")}.*/) |
192 | 192 | end |
193 | 193 |
|
194 | 194 | it "displayes the supervisor name" do |
195 | | - docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
| 195 | + docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
196 | 196 |
|
197 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 197 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
198 | 198 |
|
199 | 199 | expect(table_data).to include(/#{document_data[:supervisor_name]}.*/) |
200 | 200 | end |
|
262 | 262 |
|
263 | 263 | it "displays the case contact type" do |
264 | 264 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
265 | | - |
266 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 265 | + |
| 266 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
267 | 267 |
|
268 | 268 | expect(table_data).to include(document_data[:case_contact_type]) |
269 | 269 | end |
270 | 270 |
|
271 | 271 | it "displays the case contact time formatted" do |
272 | 272 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
273 | 273 |
|
274 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 274 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
275 | 275 |
|
276 | 276 | expect(table_data).to include(document_data[:case_contact_time].strftime("%-m/%d*")) |
277 | 277 | end |
278 | 278 |
|
279 | 279 | it "displays the test" do |
280 | 280 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
281 | 281 |
|
282 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 282 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
283 | 283 |
|
284 | 284 | expect(table_data).to include("This text shall not be strikingly similar to other text in the document") |
285 | 285 | end |
286 | 286 |
|
287 | 287 | it "displays the order status" do |
288 | 288 | docx_response = Docx::Document.open(StringIO.new(report.generate_to_string)) |
289 | 289 |
|
290 | | - table_data = docx_response.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten |
| 290 | + table_data = docx_response.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten |
291 | 291 |
|
292 | 292 | expect(table_data).to include("Partially implemented") |
293 | 293 | end |
|
0 commit comments