diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-02-25 14:20:41 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-02-25 14:20:41 +0300 |
commit | e5c7027faffb75f1d2f7221fa11609741010d82f (patch) | |
tree | d5270f59a827010355b45344c6a79114f8b95a36 /spec/models | |
parent | c39e094bc863180e351d36207b98b1680c4c8e5d (diff) | |
parent | e87c255d9e76fb3ca691267107e83d48c90bc816 (diff) |
Merge branch 'sh-fix-users-controller-ruby-2.6-compat' into 'master'
Make Admin::UsersController work with Ruby 2.6
See merge request gitlab-org/gitlab-ce!25316
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/user_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 1edd8e69b8f..85b157a9435 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -976,43 +976,43 @@ describe User do end end - describe '.filter' do + describe '.filter_items' do let(:user) { double } it 'filters by active users by default' do expect(described_class).to receive(:active).and_return([user]) - expect(described_class.filter(nil)).to include user + expect(described_class.filter_items(nil)).to include user end it 'filters by admins' do expect(described_class).to receive(:admins).and_return([user]) - expect(described_class.filter('admins')).to include user + expect(described_class.filter_items('admins')).to include user end it 'filters by blocked' do expect(described_class).to receive(:blocked).and_return([user]) - expect(described_class.filter('blocked')).to include user + expect(described_class.filter_items('blocked')).to include user end it 'filters by two_factor_disabled' do expect(described_class).to receive(:without_two_factor).and_return([user]) - expect(described_class.filter('two_factor_disabled')).to include user + expect(described_class.filter_items('two_factor_disabled')).to include user end it 'filters by two_factor_enabled' do expect(described_class).to receive(:with_two_factor).and_return([user]) - expect(described_class.filter('two_factor_enabled')).to include user + expect(described_class.filter_items('two_factor_enabled')).to include user end it 'filters by wop' do expect(described_class).to receive(:without_projects).and_return([user]) - expect(described_class.filter('wop')).to include user + expect(described_class.filter_items('wop')).to include user end end |