Merge remote-tracking branch 'parent/main' into upstream-20240319
This commit is contained in:
commit
76598bd542
496 changed files with 5795 additions and 3709 deletions
|
@ -901,7 +901,7 @@ RSpec.describe Account do
|
|||
end
|
||||
|
||||
describe 'MENTION_RE' do
|
||||
subject { Account::MENTION_RE }
|
||||
subject { described_class::MENTION_RE }
|
||||
|
||||
it 'matches usernames in the middle of a sentence' do
|
||||
expect(subject.match('Hello to @alice from me')[1]).to eq 'alice'
|
||||
|
@ -1111,7 +1111,7 @@ RSpec.describe Account do
|
|||
{ username: 'b', domain: 'b' },
|
||||
].map(&method(:Fabricate).curry(2).call(:account))
|
||||
|
||||
expect(described_class.where('id > 0').alphabetic).to eq matches
|
||||
expect(described_class.without_internal.alphabetic).to eq matches
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ RSpec.describe Account do
|
|||
it 'returns an array of accounts who do not have a domain' do
|
||||
local_account = Fabricate(:account, domain: nil)
|
||||
_account_with_domain = Fabricate(:account, domain: 'example.com')
|
||||
expect(described_class.where('id > 0').local).to contain_exactly(local_account)
|
||||
expect(described_class.without_internal.local).to contain_exactly(local_account)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1173,14 +1173,14 @@ RSpec.describe Account do
|
|||
matches[index] = Fabricate(:account, domain: matches[index])
|
||||
end
|
||||
|
||||
expect(described_class.where('id > 0').partitioned).to match_array(matches)
|
||||
expect(described_class.without_internal.partitioned).to match_array(matches)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'recent' do
|
||||
it 'returns a relation of accounts sorted by recent creation' do
|
||||
matches = Array.new(2) { Fabricate(:account) }
|
||||
expect(described_class.where('id > 0').recent).to match_array(matches)
|
||||
expect(described_class.without_internal.recent).to match_array(matches)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue