0
0
Fork 0

Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693)

This commit is contained in:
Nick Schonning 2023-02-18 09:33:41 -05:00 committed by GitHub
parent de4b8224c0
commit 5069769cbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 61 additions and 89 deletions

View file

@ -39,7 +39,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
username: 'username',
display_name: 'display name',
email: 'local-part@domain',
ip: '0.0.0.42'
ip: '0.0.0.42',
}
end

View file

@ -26,9 +26,9 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
domain_blocks_attributes: {
'0' => { enabled: '1', domain: 'example.com', severity: 'silence' },
'1' => { enabled: '0', domain: 'mastodon.social', severity: 'suspend' },
'2' => { enabled: '1', domain: 'mastodon.online', severity: 'suspend' }
}
}
'2' => { enabled: '1', domain: 'mastodon.online', severity: 'suspend' },
},
},
}
expect(DomainBlockWorker).to have_received(:perform_async).exactly(2).times

View file

@ -35,7 +35,7 @@ describe Api::V1::Accounts::CredentialsController do
source: {
privacy: 'unlisted',
sensitive: true,
}
},
}
end

View file

@ -20,7 +20,7 @@ describe Api::V1::Push::SubscriptionsController do
p256dh: 'BEm_a0bdPDhf0SOsrnB2-ategf1hHoCnpXgQsFj5JCkcoMrMt2WHoPfEYOYPzOIs9mZE8ZUaD7VA5vouy0kEkr8=',
auth: 'eH_C8rq2raXqlcBVDa1gLg==',
},
}
},
}.with_indifferent_access
end
@ -37,8 +37,8 @@ describe Api::V1::Push::SubscriptionsController do
mention: false,
poll: true,
status: false,
}
}
},
},
}.with_indifferent_access
end

View file

@ -15,7 +15,7 @@ describe Api::Web::PushSubscriptionsController do
p256dh: 'BEm_a0bdPDhf0SOsrnB2-ategf1hHoCnpXgQsFj5JCkcoMrMt2WHoPfEYOYPzOIs9mZE8ZUaD7VA5vouy0kEkr8=',
auth: 'eH_C8rq2raXqlcBVDa1gLg==',
},
}
},
}
end
@ -32,8 +32,8 @@ describe Api::Web::PushSubscriptionsController do
mention: false,
poll: true,
status: false,
}
}
},
},
}
end

View file

@ -51,8 +51,8 @@ describe Settings::ApplicationsController do
name: 'My New App',
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
website: 'http://google.com',
scopes: 'read write follow'
}
scopes: 'read write follow',
},
}
response
end
@ -73,8 +73,8 @@ describe Settings::ApplicationsController do
name: 'My New App',
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
website: 'http://google.com',
scopes: ['read', 'write', 'follow']
}
scopes: ['read', 'write', 'follow'],
},
}
response
end
@ -95,8 +95,8 @@ describe Settings::ApplicationsController do
name: '',
redirect_uri: '',
website: '',
scopes: []
}
scopes: [],
},
}
end
@ -114,14 +114,14 @@ describe Settings::ApplicationsController do
context 'success' do
let(:opts) {
{
website: 'https://foo.bar/'
website: 'https://foo.bar/',
}
}
def call_update
patch :update, params: {
id: app.id,
doorkeeper_application: opts
doorkeeper_application: opts,
}
response
end
@ -144,8 +144,8 @@ describe Settings::ApplicationsController do
name: '',
redirect_uri: '',
website: '',
scopes: []
}
scopes: [],
},
}
end

View file

@ -21,8 +21,8 @@ RSpec.describe Settings::ImportsController, type: :controller do
post :create, params: {
import: {
type: 'following',
data: fixture_file_upload('imports.txt')
}
data: fixture_file_upload('imports.txt'),
},
}
expect(response).to redirect_to(settings_import_path)
@ -34,8 +34,8 @@ RSpec.describe Settings::ImportsController, type: :controller do
post :create, params: {
import: {
type: 'blocking',
data: fixture_file_upload('imports.txt')
}
data: fixture_file_upload('imports.txt'),
},
}
expect(response).to redirect_to(settings_import_path)

View file

@ -25,7 +25,7 @@ describe Settings::Preferences::NotificationsController do
user: {
notification_emails: { follow: '1' },
interactions: { must_be_follower: '0' },
}
},
}
expect(response).to redirect_to(settings_preferences_notifications_path)

View file

@ -34,7 +34,7 @@ describe Settings::Preferences::OtherController do
user: {
setting_boost_modal: '1',
setting_delete_modal: '0',
}
},
}
expect(response).to redirect_to(settings_preferences_other_path)