diff --git a/app/components/admin/budget_phases/phases_component.rb b/app/components/admin/budget_phases/phases_component.rb index 8f45deede..59121182d 100644 --- a/app/components/admin/budget_phases/phases_component.rb +++ b/app/components/admin/budget_phases/phases_component.rb @@ -12,14 +12,14 @@ class Admin::BudgetPhases::PhasesComponent < ApplicationComponent end def start_date(phase) - formatted_date(phase.starts_at) + formatted_date(phase.starts_at) if phase.starts_at.present? end def end_date(phase) - formatted_date(phase.ends_at) + formatted_date(phase.ends_at - 1.second) if phase.ends_at.present? end def formatted_date(time) - time_tag(time.to_date, format: :default) if time.present? + time_tag(time, format: :datetime) end end diff --git a/spec/system/admin/budgets_spec.rb b/spec/system/admin/budgets_spec.rb index b03c9f88e..01e5668f9 100644 --- a/spec/system/admin/budgets_spec.rb +++ b/spec/system/admin/budgets_spec.rb @@ -267,14 +267,14 @@ describe "Admin budgets", :admin do "Reviewing voting" ], [ - "2015-07-15 - 2015-08-15", - "2015-08-15 - 2015-09-15", - "2015-09-15 - 2015-10-15", - "2015-10-15 - 2015-11-15", - "2015-11-15 - 2015-12-15", - "2015-12-15 - 2016-01-15", - "2016-01-15 - 2016-02-15", - "2016-02-15 - 2016-03-15" + "2015-07-15 00:00:00 - 2015-08-14 23:59:59", + "2015-08-15 00:00:00 - 2015-09-14 23:59:59", + "2015-09-15 00:00:00 - 2015-10-14 23:59:59", + "2015-10-15 00:00:00 - 2015-11-14 23:59:59", + "2015-11-15 00:00:00 - 2015-12-14 23:59:59", + "2015-12-15 00:00:00 - 2016-01-14 23:59:59", + "2016-01-15 00:00:00 - 2016-02-14 23:59:59", + "2016-02-15 00:00:00 - 2016-03-14 23:59:59" ] ]