Commit 573770c8 authored by David F.'s avatar David F.
Browse files

Merge branch '97-liste-saisons-disponibles-e02' into 'master'

Fixes issue when time between min date and max date less than one year: refs #97.

See merge request CDSA33/OLIGAA!97
parents 555cb9c2 481eac05
......@@ -54,6 +54,8 @@ class Season
date += 1.year
break if date > max_date
seasons <<
......@@ -128,8 +128,7 @@ RSpec.describe Season, type: :model do
it "based on :begin_at if no field provided" do
# Given
create :event, begin_at:,4,1)
create :event, begin_at:,9,1)
create :event, begin_at:,8,31)
create :event, begin_at:,3,31)
expected = ["2016-2017","2017-2018"]
# When
result = Season.all(Event)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment