Use Date.current and Time.current
Using Date.today and Time.now might lead to inconsistencies if the time zone the application uses is not the same as the system time zone.
This commit is contained in:
@@ -51,7 +51,7 @@ describe "Admin collaborative legislation" do
|
||||
|
||||
scenario "Processes are sorted by descending start date" do
|
||||
process_1 = create(:legislation_process, title: "Process 1", start_date: Date.yesterday)
|
||||
process_2 = create(:legislation_process, title: "Process 2", start_date: Date.today)
|
||||
process_2 = create(:legislation_process, title: "Process 2", start_date: Date.current)
|
||||
process_3 = create(:legislation_process, title: "Process 3", start_date: Date.tomorrow)
|
||||
|
||||
visit admin_legislation_processes_path(filter: "all")
|
||||
|
||||
Reference in New Issue
Block a user