diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/models/user_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index f087fab1ef3..dcf6b224009 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -4374,24 +4374,6 @@ RSpec.describe User do it_behaves_like '#ci_owned_runners' end - - context 'when FF ci_owned_runners_cross_joins_fix is disabled' do - before do - skip_if_multiple_databases_are_setup - - stub_feature_flags(ci_owned_runners_cross_joins_fix: false) - end - - it_behaves_like '#ci_owned_runners' - end - - context 'when FF ci_owned_runners_unnest_index is disabled uses GIN index' do - before do - stub_feature_flags(ci_owned_runners_unnest_index: false) - end - - it_behaves_like '#ci_owned_runners' - end end describe '#projects_with_reporter_access_limited_to' do @@ -6655,8 +6637,10 @@ RSpec.describe User do describe '.with_no_activity' do it 'returns users with no activity' do freeze_time do - not_that_long_ago = (described_class::MINIMUM_INACTIVE_DAYS - 1).days.ago.to_date - too_long_ago = described_class::MINIMUM_INACTIVE_DAYS.days.ago.to_date + active_not_that_long_ago = (described_class::MINIMUM_INACTIVE_DAYS - 1).days.ago.to_date + active_too_long_ago = described_class::MINIMUM_INACTIVE_DAYS.days.ago.to_date + created_recently = (described_class::MINIMUM_DAYS_CREATED - 1).days.ago.to_date + created_not_recently = described_class::MINIMUM_DAYS_CREATED.days.ago.to_date create(:user, :deactivated, last_activity_on: nil) @@ -6664,12 +6648,13 @@ RSpec.describe User do create(:user, state: :active, user_type: user_type, last_activity_on: nil) end - create(:user, last_activity_on: not_that_long_ago) - create(:user, last_activity_on: too_long_ago) + create(:user, last_activity_on: active_not_that_long_ago) + create(:user, last_activity_on: active_too_long_ago) + create(:user, last_activity_on: nil, created_at: created_recently) - user_with_no_activity = create(:user, last_activity_on: nil) + old_enough_user_with_no_activity = create(:user, last_activity_on: nil, created_at: created_not_recently) - expect(described_class.with_no_activity).to contain_exactly(user_with_no_activity) + expect(described_class.with_no_activity).to contain_exactly(old_enough_user_with_no_activity) end end end |