Skip to content

Commit 19f350b

Browse files
Ian NorrisIan Norris
authored andcommitted
fix formatting
1 parent ae11fb6 commit 19f350b

3 files changed

Lines changed: 17 additions & 18 deletions

File tree

spec/models/case_court_report_spec.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,55 +146,55 @@
146146
it "displays the case contact type" do
147147
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
148148

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
150150

151151
expect(table_data).to include(/#{document_data[:case_contact_type]}.*/)
152152
end
153153

154154
it "displays the case contact time date formatted" do
155155
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
156156

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
158158

159159
expect(table_data).to include(/#{document_data[:case_contact_time].strftime("%-m/%d")}.*/)
160160
end
161161

162162
it "displays the text" do
163163
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
164164

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
166166

167167
expect(table_data).to include(/#{document_data[:text]}.*/)
168168
end
169169

170170
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))
172172

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
174174

175175
expect(table_data).to include("Partially implemented")
176176
end
177177

178178
it "displays the volunteer name" do
179179
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
180180

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
182182

183183
expect(table_data).to include(/#{document_data[:volunteer_name]}.*/)
184184
end
185185

186186
it "displays the volunteer case assignment date formatted" do
187187
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
188188

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
190190

191191
expect(table_data).to include(/#{document_data[:volunteer_case_assignment_date].strftime("%B %-d, %Y")}.*/)
192192
end
193193

194194
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))
196196

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
198198

199199
expect(table_data).to include(/#{document_data[:supervisor_name]}.*/)
200200
end
@@ -262,32 +262,32 @@
262262

263263
it "displays the case contact type" do
264264
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
267267

268268
expect(table_data).to include(document_data[:case_contact_type])
269269
end
270270

271271
it "displays the case contact time formatted" do
272272
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
273273

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
275275

276276
expect(table_data).to include(document_data[:case_contact_time].strftime("%-m/%d*"))
277277
end
278278

279279
it "displays the test" do
280280
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
281281

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
283283

284284
expect(table_data).to include("This text shall not be strikingly similar to other text in the document")
285285
end
286286

287287
it "displays the order status" do
288288
docx_response = Docx::Document.open(StringIO.new(report.generate_to_string))
289289

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
291291

292292
expect(table_data).to include("Partially implemented")
293293
end

spec/requests/court_dates_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
docx_response = Docx::Document.open(StringIO.new(response.body))
8383

8484
expect(docx_response.paragraphs.map(&:to_s)).to include(/#{judge.name}/)
85-
8685
end
8786
end
8887

@@ -96,7 +95,7 @@
9695
docx_response = Docx::Document.open(StringIO.new(response.body))
9796

9897
expect(docx_response.paragraphs.map(&:to_s)).not_to include(/#{judge.name}/)
99-
expect(docx_response.paragraphs.map(&:to_s)).to include(/Judge\:/)
98+
expect(docx_response.paragraphs.map(&:to_s)).to include(/Judge:/)
10099
expect(docx_response.paragraphs.map(&:to_s)).to include(/None/)
101100
end
102101
end
@@ -124,7 +123,7 @@
124123
docx_response = Docx::Document.open(StringIO.new(response.body))
125124

126125
expect(docx_response.paragraphs.map(&:to_s)).not_to include(/#{hearing_type.name}/)
127-
expect(docx_response.paragraphs.map(&:to_s)).to include(/Hearing Type\:/)
126+
expect(docx_response.paragraphs.map(&:to_s)).to include(/Hearing Type:/)
128127
expect(docx_response.paragraphs.map(&:to_s)).to include(/None/)
129128
end
130129
end

spec/support/download_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def header_text(download_docx)
3232
end
3333

3434
def table_text(download_docx)
35-
download_docx.tables.map{|t| t.rows.map(&:cells).flatten.map(&:to_s)}.flatten
35+
download_docx.tables.map { |t| t.rows.map(&:cells).flatten.map(&:to_s) }.flatten
3636
end
3737

3838
def download_file_name

0 commit comments

Comments
 (0)