Skip to content

Timing based spec failure in `ee/spec/models/gitlab_subscription_spec.rb`

  1) GitlabSubscription default values should eq Thu, 02 May 2019
     Failure/Error: expect(subject.start_date).to eq(Date.today)

       expected: Thu, 02 May 2019
            got: Wed, 01 May 2019

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -Thu, 02 May 2019
       +Wed, 01 May 2019

Failed examples:

rspec ./ee/spec/models/gitlab_subscription_spec.rb:11 # GitlabSubscription default values should eq Thu, 02 May 2019

https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/205741689

The spec fails when the test is run very close to 00:00 UTC since start_date and Date.today will be different.

Edited by Heinrich Lee Yu