Skip to content

Commit 911bf62

Browse files
committed
Update ExportPartnersCSVService and specs to use contacts instead of executive_director
1 parent ce6ec31 commit 911bf62

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎app/services/exports/export_partners_csv_service.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def population_served_col(table)
136136
end
137137

138138
def executive_director_col(table)
139-
if @partials_to_show.include? "executive_director"
139+
if @partials_to_show.include? "contacts"
140140
table["Executive Director Name"] = ->(partner) { partner.profile.executive_director_name }
141141
table["Executive Director Phone"] = ->(partner) { partner.profile.executive_director_phone }
142142
table["Executive Director Email"] = ->(partner) { partner.profile.executive_director_email }

‎spec/services/exports/export_partners_csv_service_spec.rb‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
above_1_2_times_fpl: 25,
5959
greater_2_times_fpl: 25,
6060
poverty_unknown: 25,
61-
executive_director_name: "executive_director_name", # Columns from the executive_director partial
61+
executive_director_name: "executive_director_name", # Columns from the contacts partial
6262
executive_director_phone: "executive_director_phone",
6363
executive_director_email: "executive_director_email",
6464
primary_contact_name: "Jon Ralfeo",
@@ -93,7 +93,7 @@
9393
:sources_of_funding,
9494
:area_served,
9595
:population_served,
96-
:executive_director,
96+
:contacts,
9797
:pick_up_person,
9898
:agency_distribution_information
9999
]
@@ -167,7 +167,7 @@
167167
"% Greater than 2 times FPL",
168168
"% Poverty Unknown"
169169
],
170-
executive_director: [
170+
contacts: [
171171
"Executive Director Name",
172172
"Executive Director Phone",
173173
"Executive Director Email",
@@ -265,7 +265,7 @@
265265
"25",
266266
"25"
267267
],
268-
executive_director: [
268+
contacts: [
269269
"executive_director_name",
270270
"executive_director_phone",
271271
"executive_director_email",
@@ -295,6 +295,7 @@
295295
}
296296

297297
it "should have the correct headers" do
298+
p partial_to_headers.values.flatten
298299
expect(subject[0]).to eq(partial_to_headers.values.flatten)
299300
end
300301

0 commit comments

Comments
 (0)