From b5e32cfe2a11bbdbf4a1afc0ca3a381071178072 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 28 Mar 2019 17:45:36 +1100 Subject: [PATCH] DEV: correct spec to test for correct fidelity This is due to 9ebabc1d --- plugins/poll/spec/controllers/posts_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/poll/spec/controllers/posts_controller_spec.rb b/plugins/poll/spec/controllers/posts_controller_spec.rb index 30fcad9cde3..3c7ff8c15dd 100644 --- a/plugins/poll/spec/controllers/posts_controller_spec.rb +++ b/plugins/poll/spec/controllers/posts_controller_spec.rb @@ -51,7 +51,7 @@ describe PostsController do json = ::JSON.parse(response.body) post_id = json["id"] - expect(Poll.find_by(post_id: post_id).close_at).to eq(1.month.from_now) + expect(Poll.find_by(post_id: post_id).close_at).to be_within_one_second_of(1.month.from_now) job = Jobs::ClosePoll.jobs.first job_args = job["args"].first