Commit 7d27bb49 authored by Alessio Caiazza's avatar Alessio Caiazza

Merge branch 'fix-broken-master' into 'master'

Fix broken master

See merge request gitlab-org/gitlab!43534
parents 3475cca6 7ed65cd5
......@@ -229,13 +229,17 @@ RSpec.describe Member do
end
describe '.not_expired' do
let_it_be(:expiring_yesterday) { create(:group_member, expires_at: 1.day.ago) }
let_it_be(:expiring_today) { create(:group_member, expires_at: Date.today) }
let_it_be(:expiring_tomorrow) { create(:group_member, expires_at: 1.day.from_now) }
let_it_be(:expiring_yesterday) { create(:group_member, expires_at: 1.day.from_now) }
let_it_be(:expiring_today) { create(:group_member, expires_at: 2.days.from_now) }
let_it_be(:expiring_tomorrow) { create(:group_member, expires_at: 3.days.from_now) }
let_it_be(:not_expiring) { create(:group_member) }
subject { described_class.not_expired }
around do |example|
travel_to(2.days.from_now) { example.run }
end
it { is_expected.not_to include(expiring_yesterday, expiring_today) }
it { is_expected.to include(expiring_tomorrow, not_expiring) }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment