Add coverage for ReportFilter and AccountFilter (#3236)
This commit is contained in:
@ -89,6 +89,8 @@ class Account < ApplicationRecord
|
||||
scope :recent, -> { reorder(id: :desc) }
|
||||
scope :alphabetic, -> { order(domain: :asc, username: :asc) }
|
||||
scope :by_domain_accounts, -> { group(:domain).select(:domain, 'COUNT(*) AS accounts_count').order('accounts_count desc') }
|
||||
scope :matches_username, ->(value) { where(arel_table[:username].matches("#{value}%")) }
|
||||
scope :matches_display_name, ->(value) { where(arel_table[:display_name].matches("#{value}%")) }
|
||||
|
||||
delegate :email,
|
||||
:current_sign_in_ip,
|
||||
|
Reference in New Issue
Block a user