Skip to content

Commit 6ff3f76

Browse files
committed
[4987] words
1 parent 9843cc9 commit 6ff3f76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/requests/reports/annual_reports_requests_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
.to raise_error(ActionController::UrlGenerationError)
9393
end
9494

95-
it "uses the organization's earliest reporting year as year_start if it's the earliest" do
95+
it "uses the earliest(smallest) year between year_start and organization's earliest_reporting_year" do
9696
get range_reports_annual_reports_path(year_start: 2004, year_end: 2008, format: :csv)
9797
# the organization was created in 2006 (created_at_2006)
9898
# so the below years should not be in the output
@@ -103,6 +103,7 @@
103103
it "orders the years in ascending order" do
104104
get range_reports_annual_reports_path(year_start: 2018, year_end: 2016, format: :csv)
105105
csv_array = response.body.split("\n")
106+
# csv_array[0] is the header row
106107
expect(csv_array[1]).to include("2016")
107108
expect(csv_array[2]).to include("2017")
108109
expect(csv_array[3]).to include("2018")

0 commit comments

Comments
 (0)