Skip to content

A platform for community discussion. Free, open, simple.

DEV: spec suite fails on leap years

Sam Saffrone23e247dffdc
diff --git a/spec/components/post_creator_spec.rb b/spec/components/post_creator_spec.rb
index 779c829ed43..d5bbb9fef58 100644
--- a/spec/components/post_creator_spec.rb
+++ b/spec/components/post_creator_spec.rb
@@ -485,7 +485,8 @@ describe PostCreator do
it 'whispers do not mess up the public view' do
- freeze_time
+ # turns out this can fail on leap years if we don't do this
+ freeze_time DateTime.parse('2010-01-01 12:00')
first = PostCreator.new(
user,
@@ -1414,7 +1415,7 @@ describe PostCreator do
end
it "links post uploads" do
- public_post = PostCreator.create(
+ _public_post = PostCreator.create(
user,
topic_id: public_topic.id,
raw: "A public post with an image.\n![](#{image_upload.short_path})"