Commit 3bcd20f0 authored by Serena Fang's avatar Serena Fang

Remove banned from blocked scope

parent 4c063349
......@@ -381,7 +381,7 @@ class User < ApplicationRecord
# Scopes
scope :admins, -> { where(admin: true) }
scope :instance_access_request_approvers_to_be_notified, -> { admins.active.order_recent_sign_in.limit(INSTANCE_ACCESS_REQUEST_APPROVERS_TO_BE_NOTIFIED_LIMIT) }
scope :blocked, -> { with_states(:blocked, :ldap_blocked, :banned) }
scope :blocked, -> { with_states(:blocked, :ldap_blocked) }
scope :blocked_pending_approval, -> { with_states(:blocked_pending_approval) }
scope :banned, -> { with_states(:banned) }
scope :external, -> { where(external: true) }
......
......@@ -736,11 +736,10 @@ RSpec.describe User do
it 'returns only blocked users' do
expect(subject).to include(
blocked_user,
banned_user,
ldap_blocked_user
)
expect(subject).not_to include(active_user, blocked_pending_approval_user)
expect(subject).not_to include(active_user, blocked_pending_approval_user, banned_user)
end
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