Merge commit '9e04007020
' into upstream-20240725
This commit is contained in:
commit
a99f174d98
322 changed files with 8093 additions and 1586 deletions
|
@ -37,10 +37,32 @@ RSpec.describe Admin::InstancesController do
|
|||
end
|
||||
|
||||
describe 'GET #show' do
|
||||
before do
|
||||
allow(Admin::ActionLogFilter).to receive(:new).and_call_original
|
||||
end
|
||||
|
||||
it 'shows an instance page' do
|
||||
get :show, params: { id: account_popular_main.domain }
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
|
||||
instance = assigns(:instance)
|
||||
expect(instance).to_not be_new_record
|
||||
|
||||
expect(Admin::ActionLogFilter).to have_received(:new).with(target_domain: account_popular_main.domain)
|
||||
|
||||
action_logs = assigns(:action_logs).to_a
|
||||
expect(action_logs.size).to eq 0
|
||||
end
|
||||
|
||||
context 'with an unknown domain' do
|
||||
it 'returns http success' do
|
||||
get :show, params: { id: 'unknown.example' }
|
||||
expect(response).to have_http_status(200)
|
||||
|
||||
instance = assigns(:instance)
|
||||
expect(instance).to be_new_record
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ describe Admin::ReportsController do
|
|||
|
||||
describe 'POST #reopen' do
|
||||
it 'reopens the report' do
|
||||
report = Fabricate(:report)
|
||||
report = Fabricate(:report, action_taken_at: 3.days.ago)
|
||||
|
||||
put :reopen, params: { id: report }
|
||||
expect(response).to redirect_to(admin_report_path(report))
|
||||
|
@ -89,7 +89,7 @@ describe Admin::ReportsController do
|
|||
|
||||
describe 'POST #unassign' do
|
||||
it 'reopens the report' do
|
||||
report = Fabricate(:report)
|
||||
report = Fabricate(:report, assigned_account_id: Account.last.id)
|
||||
|
||||
put :unassign, params: { id: report }
|
||||
expect(response).to redirect_to(admin_report_path(report))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue