Merge remote-tracking branch 'parent/main' into upstream-20231204
This commit is contained in:
commit
94c2396a34
179 changed files with 1036 additions and 775 deletions
|
@ -652,7 +652,7 @@ RSpec.describe Account do
|
|||
end
|
||||
|
||||
it 'limits via constant by default' do
|
||||
stub_const('AccountSearch::DEFAULT_LIMIT', 1)
|
||||
stub_const('Account::Search::DEFAULT_LIMIT', 1)
|
||||
2.times.each { Fabricate(:account, display_name: 'Display Name') }
|
||||
results = described_class.search_for('display')
|
||||
expect(results.size).to eq 1
|
||||
|
@ -823,7 +823,7 @@ RSpec.describe Account do
|
|||
end
|
||||
|
||||
it 'limits by 10 by default' do
|
||||
stub_const('AccountSearch::DEFAULT_LIMIT', 1)
|
||||
stub_const('Account::Search::DEFAULT_LIMIT', 1)
|
||||
2.times { Fabricate(:account, display_name: 'Display Name') }
|
||||
results = described_class.advanced_search_for('display', account)
|
||||
expect(results.size).to eq 1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountCounters do
|
||||
describe Account::Counters do
|
||||
let!(:account) { Fabricate(:account) }
|
||||
|
||||
describe '#increment_count!' do
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountFinderConcern do
|
||||
describe Account::FinderConcern do
|
||||
describe 'local finders' do
|
||||
let!(:account) { Fabricate(:account, username: 'Alice') }
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountInteractions do
|
||||
describe Account::Interactions do
|
||||
let(:account) { Fabricate(:account, username: 'account') }
|
||||
let(:account_id) { account.id }
|
||||
let(:account_ids) { [account_id] }
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountStatusesSearch do
|
||||
describe Account::StatusesSearch do
|
||||
let(:account) { Fabricate(:account, indexable: indexable) }
|
||||
|
||||
before do
|
|
@ -31,7 +31,7 @@ RSpec.describe Remotable do
|
|||
end
|
||||
end
|
||||
|
||||
let(:attribute_name) { "#{hoge}_remote_url".to_sym }
|
||||
let(:attribute_name) { :"#{hoge}_remote_url" }
|
||||
let(:code) { 200 }
|
||||
let(:file) { 'filename="foo.txt"' }
|
||||
let(:foo) { foo_class.new }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rails_helper'
|
||||
|
||||
describe StatusThreadingConcern do
|
||||
describe Status::ThreadingConcern do
|
||||
describe '#ancestors' do
|
||||
let!(:alice) { Fabricate(:account, username: 'alice') }
|
||||
let!(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com') }
|
|
@ -110,9 +110,9 @@ describe Report do
|
|||
let(:status) { Fabricate(:status) }
|
||||
|
||||
before do
|
||||
Fabricate('Admin::ActionLog', target_type: 'Report', account_id: target_account.id, target_id: report.id, created_at: 2.days.ago)
|
||||
Fabricate('Admin::ActionLog', target_type: 'Account', account_id: target_account.id, target_id: report.target_account_id, created_at: 2.days.ago)
|
||||
Fabricate('Admin::ActionLog', target_type: 'Status', account_id: target_account.id, target_id: status.id, created_at: 2.days.ago)
|
||||
Fabricate(:action_log, target_type: 'Report', account_id: target_account.id, target_id: report.id, created_at: 2.days.ago)
|
||||
Fabricate(:action_log, target_type: 'Account', account_id: target_account.id, target_id: report.target_account_id, created_at: 2.days.ago)
|
||||
Fabricate(:action_log, target_type: 'Status', account_id: target_account.id, target_id: status.id, created_at: 2.days.ago)
|
||||
end
|
||||
|
||||
it 'returns right logs' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue