A platform for community discussion. Free, open, simple.
Fixed test suite with PREFABRICATION=0 (#7574)
Daniel Waterworthcac7e43ba725
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rbindex 98b5fb187b2..cdb8b4ac7e9 100644--- a/spec/models/topic_spec.rb+++ b/spec/models/topic_spec.rb@@ -932,7 +932,7 @@ describe Topic doit 'should not be visible and have correct counts' doexpect(topic).not_to be_visibleexpect(topic.moderator_posts_count).to eq(1)- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)endend@@ -946,7 +946,7 @@ describe Topic doit 'should be visible with correct counts' doexpect(topic).to be_visibleexpect(topic.moderator_posts_count).to eq(1)- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)endendend@@ -961,7 +961,7 @@ describe Topic doit "doesn't have a pinned_at but has correct dates" doexpect(topic.pinned_at).to be_blankexpect(topic.moderator_posts_count).to eq(1)- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)endend@@ -974,7 +974,7 @@ describe Topic doit 'should enable correctly' doexpect(topic.pinned_at).to be_present- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)expect(topic.moderator_posts_count).to eq(1)end@@ -992,7 +992,7 @@ describe Topic doit 'should archive correctly' doexpect(@archived_topic).not_to be_archived- expect(@archived_topic.bumped_at.to_f).to be_within(0.1).of(@original_bumped_at)+ expect(@archived_topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)expect(@archived_topic.moderator_posts_count).to eq(1)endend@@ -1007,9 +1007,8 @@ describe Topic doit 'should be archived' doexpect(topic).to be_archivedexpect(topic.moderator_posts_count).to eq(1)- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)end-endend@@ -1025,9 +1024,8 @@ describe Topic doit 'should not be pinned' doexpect(@closed_topic).not_to be_closedexpect(@closed_topic.moderator_posts_count).to eq(1)- expect(@closed_topic.bumped_at.to_f).not_to eq(@original_bumped_at)+ expect(@closed_topic.bumped_at.to_f).not_to be_within(1e-4).of(@original_bumped_at)end-endcontext 'enable' do@@ -1039,7 +1037,7 @@ describe Topic doit 'should be closed' doexpect(topic).to be_closed- expect(topic.bumped_at.to_f).to eq(@original_bumped_at)+ expect(topic.bumped_at.to_f).to be_within(1e-4).of(@original_bumped_at)expect(topic.moderator_posts_count).to eq(1)expect(topic.topic_timers.first).to eq(nil)end