Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spec failure invovling time (#12617) #12618

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions services/QuillLMS/spec/queries/student_dashboard_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@
describe StudentDashboardMetrics do
before do
travel_to 1.month.from_now if Time.current.month == 7

now = Time.current
wednesday_noon = now.beginning_of_week(:wednesday).noon
first_of_month = now.beginning_of_month

if wednesday_noon - 7.days < first_of_month
travel_to wednesday_noon + 1.week
else
travel_to wednesday_noon
end
travel_to(Time.current.change(day: 10))
end

after do
Expand Down
Loading