From 6a1747eee758978ca186948d6670463fe9d5fb7e Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 9 Jul 2022 19:51:03 +0200 Subject: [PATCH] Reload times to match precision --- spec/lib/exporter_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/lib/exporter_spec.rb b/spec/lib/exporter_spec.rb index 1d66d0f8..be26a301 100644 --- a/spec/lib/exporter_spec.rb +++ b/spec/lib/exporter_spec.rb @@ -76,17 +76,17 @@ RSpec.describe Exporter do expect(instance.instance_variable_get(:@obj)[:smiles]).to eq(smiles.map do |s| { id: s.id, - created_at: s.created_at, + created_at: s.reload.created_at, answer: { comment_count: s.parent.comment_count, content: s.parent.content, - created_at: s.parent.created_at, + created_at: s.parent.reload.created_at, id: s.parent.id, question: { answer_count: s.parent.question.answer_count, author_is_anonymous: s.parent.question.author_is_anonymous, content: s.parent.question.content, - created_at: s.parent.question.created_at, + created_at: s.parent.question.reload.created_at, id: s.parent.question.id, user: nil # we're not populating this in the factory },