Commit 85f53985dbe71bd6a6bcea7a0127747c97293474

Authored by Antonio Terceiro
2 parents 9907de14 8b709bd0

Merge branch 'fix_community_track' into 'master'

Fix tests of community_track plugin

We still have one failing test, to fix it we need to bump will_paginate version to 3.0.7. We did not do it because this version is not available on Debian stable, only on testing. When ruby-will-paginate will be available in Debian stable we just need to bump version in Gemfile and debian/control.

See merge request !769
plugins/community_track/test/unit/community_track_plugin/step_test.rb
@@ -124,14 +124,14 @@ class StepTest < ActiveSupport::TestCase @@ -124,14 +124,14 @@ class StepTest < ActiveSupport::TestCase
124 @step.end_date = DateTime.now.end_of_day 124 @step.end_date = DateTime.now.end_of_day
125 @step.accept_comments = false 125 @step.accept_comments = false
126 @step.schedule_activation 126 @step.schedule_activation
127 - assert_equal @step.start_date, Delayed::Job.first.run_at 127 + assert_in_delta @step.start_date, Delayed::Job.first.run_at
128 end 128 end
129 129
130 should 'create delayed job if end date has passed' do 130 should 'create delayed job if end date has passed' do
131 @step.start_date = DateTime.now - 5.days 131 @step.start_date = DateTime.now - 5.days
132 @step.end_date = DateTime.now - 2.days 132 @step.end_date = DateTime.now - 2.days
133 @step.schedule_activation 133 @step.schedule_activation
134 - assert_equal @step.end_date + 1.day, Delayed::Job.first.run_at 134 + assert_in_delta @step.end_date + 1.day, Delayed::Job.first.run_at
135 end 135 end
136 136
137 should 'do not schedule delayed job if save but do not modify date fields' do 137 should 'do not schedule delayed job if save but do not modify date fields' do