Skip to content

Commit d489bdd

Browse files
authored
Merge pull request #5385 from rubyforgood/#5370-make-it-more-explicit-in-the-adjustments-export-that-the-values-are-differences
#5370 make it more explicit in the adjustments export that the values are differences
2 parents 6de15f3 + 60f1b86 commit d489bdd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/services/exports/export_adjustments_csv_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def generate_csv_data(adjustments, organization)
1111
item_names = get_item_names(organization)
1212
headers = [
1313
"Created date", "Storage Area",
14-
"Comment", "# of changes"
14+
"Comment", "Updates"
1515
] + item_names
1616

1717
[headers] + adjustments.map { |adjustment| build_row(adjustment, item_names) }

spec/requests/adjustments_requests_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

120120
it "includes appropriate headers and data" do
121121
csv = <<~CSV
122-
Created date,Storage Area,Comment,# of changes,#{item1.name},#{item2.name}
122+
Created date,Storage Area,Comment,Updates,#{item1.name},#{item2.name}
123123
2019-06-30,Test Storage Location,First adjustment,2,10,5
124124
2019-06-26,Test Storage Location,Second adjustment,1,-5,0
125125
CSV
@@ -135,7 +135,7 @@
135135
get adjustments_path, params: { filters: { date_range: "#{start_date} - #{end_date}" }, format: 'csv' }
136136

137137
csv = <<~CSV
138-
Created date,Storage Area,Comment,# of changes,Item One,Item Two
138+
Created date,Storage Area,Comment,Updates,Item One,Item Two
139139
2019-06-30,Test Storage Location,First adjustment,2,10,5
140140
CSV
141141

spec/services/exports/export_adjustments_csv_service_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
it "should include the correct adjustment data" do
7070
csv = <<~CSV
71-
Created date,Storage Area,Comment,# of changes,item1,item2,item3,item4,item5
71+
Created date,Storage Area,Comment,Updates,item1,item2,item3,item4,item5
7272
2024-12-25,Test Storage Location,adjustment 1,2,10,-5,0,0,0
7373
2024-12-25,Test Storage Location,adjustment 2,1,0,0,3,0,0
7474
2024-12-25,Test Storage Location,adjustment 3,1,7,0,0,0,0
@@ -83,7 +83,7 @@
8383

8484
it "returns only headers row" do
8585
csv = <<~CSV
86-
Created date,Storage Area,Comment,# of changes,item1,item2,item3,item4,item5
86+
Created date,Storage Area,Comment,Updates,item1,item2,item3,item4,item5
8787
CSV
8888

8989
expect(subject).to eq(csv)

0 commit comments

Comments
 (0)