Fix RSpec/MissingExampleGroupArgument cop (#25310)
This commit is contained in:
parent
b74c3cd708
commit
6c0e3f490a
22 changed files with 38 additions and 68 deletions
|
@ -99,7 +99,7 @@ RSpec.describe AccountsController do
|
|||
end
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with a normal account in an HTML request' do
|
||||
before do
|
||||
get :show, params: { username: account.username, format: format }
|
||||
end
|
||||
|
@ -173,7 +173,7 @@ RSpec.describe AccountsController do
|
|||
end
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with a normal account in a JSON request' do
|
||||
before do
|
||||
get :show, params: { username: account.username, format: format }
|
||||
end
|
||||
|
@ -314,7 +314,7 @@ RSpec.describe AccountsController do
|
|||
it_behaves_like 'cacheable response'
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with a normal account in an RSS request' do
|
||||
before do
|
||||
get :show, params: { username: account.username, format: format }
|
||||
end
|
||||
|
|
|
@ -88,7 +88,7 @@ RSpec.describe ActivityPub::CollectionsController do
|
|||
context 'with signature' do
|
||||
let(:remote_account) { Fabricate(:account, domain: 'example.com') }
|
||||
|
||||
context do
|
||||
context 'when getting a featured resource' do
|
||||
before do
|
||||
get :show, params: { id: 'featured', account_username: account.username }
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ describe Admin::StatusesController do
|
|||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
context do
|
||||
context 'with a valid account' do
|
||||
before do
|
||||
get :index, params: { account_id: account.id }
|
||||
end
|
||||
|
|
|
@ -40,7 +40,7 @@ describe Admin::Users::RolesController do
|
|||
put :update, params: { user_id: user.id, user: { role_id: selected_role.id } }
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with manage roles permissions' do
|
||||
let(:permissions) { UserRole::FLAGS[:manage_roles] }
|
||||
let(:position) { 1 }
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ RSpec.describe Api::V1::AccountsController do
|
|||
let(:scopes) { 'write:follows' }
|
||||
let(:other_account) { Fabricate(:account, username: 'bob', locked: locked) }
|
||||
|
||||
context do
|
||||
context 'when posting to an other account' do
|
||||
before do
|
||||
post :follow, params: { id: other_account.id }
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ RSpec.describe Api::V1::Admin::AccountActionsController do
|
|||
end
|
||||
|
||||
describe 'POST #create' do
|
||||
context do
|
||||
context 'with type of disable' do
|
||||
before do
|
||||
post :create, params: { account_id: account.id, type: 'disable' }
|
||||
end
|
||||
|
|
|
@ -96,7 +96,7 @@ RSpec.describe Api::V1::Admin::DomainAllowsController do
|
|||
describe 'POST #create' do
|
||||
let!(:domain_allow) { Fabricate(:domain_allow, domain: 'example.com') }
|
||||
|
||||
context do
|
||||
context 'with a valid domain' do
|
||||
before do
|
||||
post :create, params: { domain: 'foo.bar.com' }
|
||||
end
|
||||
|
|
|
@ -120,7 +120,7 @@ RSpec.describe Api::V1::StatusesController do
|
|||
describe 'POST #create' do
|
||||
let(:scopes) { 'write:statuses' }
|
||||
|
||||
context do
|
||||
context 'with a basic status body' do
|
||||
before do
|
||||
post :create, params: { status: 'Hello world' }
|
||||
end
|
||||
|
|
|
@ -79,7 +79,7 @@ RSpec.describe Auth::RegistrationsController do
|
|||
request.env['devise.mapping'] = Devise.mappings[:user]
|
||||
end
|
||||
|
||||
context do
|
||||
context 'with open registrations' do
|
||||
around do |example|
|
||||
registrations_mode = Setting.registrations_mode
|
||||
example.run
|
||||
|
@ -111,7 +111,7 @@ RSpec.describe Auth::RegistrationsController do
|
|||
end
|
||||
end
|
||||
|
||||
context do
|
||||
context 'when an accept language is present in headers' do
|
||||
subject do
|
||||
Setting.registrations_mode = 'open'
|
||||
request.headers['Accept-Language'] = accept_language
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue