0
0
Fork 0

Move account sensitize-related methods to concern (#28865)

This commit is contained in:
Matt Jankowski 2024-11-11 08:08:23 -05:00 committed by GitHub
parent d033920b7e
commit c78dc23b49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 13 deletions

View file

@ -0,0 +1,18 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Account::Sensitizes do
describe 'Scopes' do
describe '.sensitized' do
let(:sensitized_account) { Fabricate :account, sensitized_at: 2.days.ago }
before { Fabricate :account, sensitized_at: false }
it 'returns an array of accounts who are sensitized' do
expect(Account.sensitized)
.to contain_exactly(sensitized_account)
end
end
end
end