Skip to content

Commit de771a9

Browse files
committed
Copilot suggestions
1 parent e3c80f8 commit de771a9

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

app/models/case_court_report_context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def org_address(path_to_template)
108108
def court_topics
109109
topics = ContactTopic
110110
.joins(contact_topic_answers: {case_contact: [:casa_case, :contact_types]}).distinct
111-
.where(exclude_from_court_report: false)
111+
.where(contact_topics: { exclude_from_court_report: false })
112112
.where("casa_cases.id": @casa_case.id)
113113
.where("case_contacts.occurred_at": @date_range)
114114
.order(:occurred_at, :value)

spec/models/case_court_report_context_spec.rb

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -220,37 +220,6 @@
220220
create_list(:contact_topic_answer, 2, case_contact: other_case_contact, contact_topic: topics[0], value: "Answer From Another Case")
221221
end
222222

223-
let(:related_topics_hash) do
224-
{
225-
"Question 1" => {
226-
answers: [
227-
{date: "01/01/20", medium: "Type 2, Type 2", value: "Answer From One Year Ago"},
228-
{date: "12/02/20", medium: "Type A1, Type B1", value: "Answer 1"},
229-
{date: "12/03/20", medium: "Type A2, Type B2", value: "Answer 3"},
230-
{date: "12/31/20", medium: "Type 1, Type 1", value: "Answer From One Day Ago"}
231-
],
232-
topic: "Question 1",
233-
details: "Details 1"
234-
},
235-
"Question 2 (Set 1)" => {
236-
answers: [
237-
{date: "12/02/20", medium: "Type A1, Type B1", value: "Answer 2"},
238-
{date: "12/04/20", medium: "Type A3, Type B3", value: "Answer 5"}
239-
],
240-
topic: "Question 2",
241-
details: "Details 2"
242-
},
243-
"Question 3" => {
244-
answers: [
245-
{date: "12/03/20", medium: "Type A2, Type B2", value: "No Answer Provided"},
246-
{date: "12/04/20", medium: "Type A3, Type B3", value: "No Answer Provided"}
247-
],
248-
topic: "Question 3",
249-
details: "Details 3"
250-
}
251-
}
252-
end
253-
254223
it "returns a hash of topics with the correct shape" do
255224
court_topics = build(:case_court_report_context, casa_case: casa_case).court_topics
256225

0 commit comments

Comments
 (0)