mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 20:15:10 +01:00
Fix RSpec/InferredSpecType cop (#24736)
This commit is contained in:
parent
710745e16b
commit
c97b611b6b
@ -648,181 +648,6 @@ RSpec/PredicateMatcher:
|
||||
- 'spec/models/user_spec.rb'
|
||||
- 'spec/services/post_status_service_spec.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Inferences.
|
||||
RSpec/Rails/InferredSpecType:
|
||||
Exclude:
|
||||
- 'spec/controllers/about_controller_spec.rb'
|
||||
- 'spec/controllers/accounts_controller_spec.rb'
|
||||
- 'spec/controllers/activitypub/collections_controller_spec.rb'
|
||||
- 'spec/controllers/activitypub/followers_synchronizations_controller_spec.rb'
|
||||
- 'spec/controllers/activitypub/inboxes_controller_spec.rb'
|
||||
- 'spec/controllers/activitypub/outboxes_controller_spec.rb'
|
||||
- 'spec/controllers/activitypub/replies_controller_spec.rb'
|
||||
- 'spec/controllers/admin/account_moderation_notes_controller_spec.rb'
|
||||
- 'spec/controllers/admin/accounts_controller_spec.rb'
|
||||
- 'spec/controllers/admin/action_logs_controller_spec.rb'
|
||||
- 'spec/controllers/admin/base_controller_spec.rb'
|
||||
- 'spec/controllers/admin/change_emails_controller_spec.rb'
|
||||
- 'spec/controllers/admin/confirmations_controller_spec.rb'
|
||||
- 'spec/controllers/admin/dashboard_controller_spec.rb'
|
||||
- 'spec/controllers/admin/disputes/appeals_controller_spec.rb'
|
||||
- 'spec/controllers/admin/domain_allows_controller_spec.rb'
|
||||
- 'spec/controllers/admin/domain_blocks_controller_spec.rb'
|
||||
- 'spec/controllers/admin/email_domain_blocks_controller_spec.rb'
|
||||
- 'spec/controllers/admin/export_domain_allows_controller_spec.rb'
|
||||
- 'spec/controllers/admin/export_domain_blocks_controller_spec.rb'
|
||||
- 'spec/controllers/admin/instances_controller_spec.rb'
|
||||
- 'spec/controllers/admin/settings/branding_controller_spec.rb'
|
||||
- 'spec/controllers/admin/tags_controller_spec.rb'
|
||||
- 'spec/controllers/api/oembed_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/accounts/pins_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/accounts/search_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/accounts_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/admin/account_actions_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/admin/domain_allows_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/admin/reports_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/announcements/reactions_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/announcements_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/apps_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/blocks_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/bookmarks_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/conversations_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/custom_emojis_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/domain_blocks_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/emails/confirmations_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/endorsements_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/favourites_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/filters_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/follow_requests_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/followed_tags_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/instances/activity_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/instances/peers_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/instances_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/lists_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/markers_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/media_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/mutes_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/notifications_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/polls/votes_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/polls_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/reports_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/statuses_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/suggestions_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/tags_controller_spec.rb'
|
||||
- 'spec/controllers/api/v1/trends/tags_controller_spec.rb'
|
||||
- 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
|
||||
- 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
|
||||
- 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
|
||||
- 'spec/controllers/api/v2/filters_controller_spec.rb'
|
||||
- 'spec/controllers/api/v2/search_controller_spec.rb'
|
||||
- 'spec/controllers/application_controller_spec.rb'
|
||||
- 'spec/controllers/auth/challenges_controller_spec.rb'
|
||||
- 'spec/controllers/auth/confirmations_controller_spec.rb'
|
||||
- 'spec/controllers/auth/passwords_controller_spec.rb'
|
||||
- 'spec/controllers/auth/registrations_controller_spec.rb'
|
||||
- 'spec/controllers/auth/sessions_controller_spec.rb'
|
||||
- 'spec/controllers/concerns/account_controller_concern_spec.rb'
|
||||
- 'spec/controllers/concerns/cache_concern_spec.rb'
|
||||
- 'spec/controllers/concerns/challengable_concern_spec.rb'
|
||||
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
|
||||
- 'spec/controllers/concerns/localized_spec.rb'
|
||||
- 'spec/controllers/concerns/signature_verification_spec.rb'
|
||||
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
|
||||
- 'spec/controllers/disputes/appeals_controller_spec.rb'
|
||||
- 'spec/controllers/disputes/strikes_controller_spec.rb'
|
||||
- 'spec/controllers/home_controller_spec.rb'
|
||||
- 'spec/controllers/instance_actors_controller_spec.rb'
|
||||
- 'spec/controllers/intents_controller_spec.rb'
|
||||
- 'spec/controllers/oauth/authorizations_controller_spec.rb'
|
||||
- 'spec/controllers/oauth/tokens_controller_spec.rb'
|
||||
- 'spec/controllers/settings/imports_controller_spec.rb'
|
||||
- 'spec/controllers/settings/profiles_controller_spec.rb'
|
||||
- 'spec/controllers/statuses_cleanup_controller_spec.rb'
|
||||
- 'spec/controllers/tags_controller_spec.rb'
|
||||
- 'spec/controllers/well_known/host_meta_controller_spec.rb'
|
||||
- 'spec/controllers/well_known/nodeinfo_controller_spec.rb'
|
||||
- 'spec/controllers/well_known/webfinger_controller_spec.rb'
|
||||
- 'spec/helpers/accounts_helper_spec.rb'
|
||||
- 'spec/helpers/admin/account_moderation_notes_helper_spec.rb'
|
||||
- 'spec/helpers/admin/action_logs_helper_spec.rb'
|
||||
- 'spec/helpers/flashes_helper_spec.rb'
|
||||
- 'spec/helpers/formatting_helper_spec.rb'
|
||||
- 'spec/helpers/home_helper_spec.rb'
|
||||
- 'spec/helpers/routing_helper_spec.rb'
|
||||
- 'spec/mailers/admin_mailer_spec.rb'
|
||||
- 'spec/mailers/notification_mailer_spec.rb'
|
||||
- 'spec/mailers/user_mailer_spec.rb'
|
||||
- 'spec/models/account/field_spec.rb'
|
||||
- 'spec/models/account_alias_spec.rb'
|
||||
- 'spec/models/account_conversation_spec.rb'
|
||||
- 'spec/models/account_deletion_request_spec.rb'
|
||||
- 'spec/models/account_domain_block_spec.rb'
|
||||
- 'spec/models/account_migration_spec.rb'
|
||||
- 'spec/models/account_moderation_note_spec.rb'
|
||||
- 'spec/models/account_spec.rb'
|
||||
- 'spec/models/account_statuses_cleanup_policy_spec.rb'
|
||||
- 'spec/models/admin/account_action_spec.rb'
|
||||
- 'spec/models/admin/action_log_spec.rb'
|
||||
- 'spec/models/announcement_mute_spec.rb'
|
||||
- 'spec/models/announcement_reaction_spec.rb'
|
||||
- 'spec/models/announcement_spec.rb'
|
||||
- 'spec/models/backup_spec.rb'
|
||||
- 'spec/models/block_spec.rb'
|
||||
- 'spec/models/canonical_email_block_spec.rb'
|
||||
- 'spec/models/conversation_mute_spec.rb'
|
||||
- 'spec/models/conversation_spec.rb'
|
||||
- 'spec/models/custom_emoji_spec.rb'
|
||||
- 'spec/models/custom_filter_keyword_spec.rb'
|
||||
- 'spec/models/custom_filter_spec.rb'
|
||||
- 'spec/models/device_spec.rb'
|
||||
- 'spec/models/domain_block_spec.rb'
|
||||
- 'spec/models/email_domain_block_spec.rb'
|
||||
- 'spec/models/encrypted_message_spec.rb'
|
||||
- 'spec/models/favourite_spec.rb'
|
||||
- 'spec/models/featured_tag_spec.rb'
|
||||
- 'spec/models/follow_recommendation_suppression_spec.rb'
|
||||
- 'spec/models/follow_request_spec.rb'
|
||||
- 'spec/models/follow_spec.rb'
|
||||
- 'spec/models/home_feed_spec.rb'
|
||||
- 'spec/models/identity_spec.rb'
|
||||
- 'spec/models/import_spec.rb'
|
||||
- 'spec/models/invite_spec.rb'
|
||||
- 'spec/models/list_account_spec.rb'
|
||||
- 'spec/models/list_spec.rb'
|
||||
- 'spec/models/login_activity_spec.rb'
|
||||
- 'spec/models/media_attachment_spec.rb'
|
||||
- 'spec/models/mention_spec.rb'
|
||||
- 'spec/models/mute_spec.rb'
|
||||
- 'spec/models/notification_spec.rb'
|
||||
- 'spec/models/poll_vote_spec.rb'
|
||||
- 'spec/models/preview_card_spec.rb'
|
||||
- 'spec/models/preview_card_trend_spec.rb'
|
||||
- 'spec/models/public_feed_spec.rb'
|
||||
- 'spec/models/relay_spec.rb'
|
||||
- 'spec/models/scheduled_status_spec.rb'
|
||||
- 'spec/models/session_activation_spec.rb'
|
||||
- 'spec/models/setting_spec.rb'
|
||||
- 'spec/models/site_upload_spec.rb'
|
||||
- 'spec/models/status_pin_spec.rb'
|
||||
- 'spec/models/status_spec.rb'
|
||||
- 'spec/models/status_stat_spec.rb'
|
||||
- 'spec/models/status_trend_spec.rb'
|
||||
- 'spec/models/system_key_spec.rb'
|
||||
- 'spec/models/tag_follow_spec.rb'
|
||||
- 'spec/models/unavailable_domain_spec.rb'
|
||||
- 'spec/models/user_invite_request_spec.rb'
|
||||
- 'spec/models/user_role_spec.rb'
|
||||
- 'spec/models/user_spec.rb'
|
||||
- 'spec/models/web/push_subscription_spec.rb'
|
||||
- 'spec/models/web/setting_spec.rb'
|
||||
- 'spec/models/webauthn_credentials_spec.rb'
|
||||
- 'spec/models/webhook_spec.rb'
|
||||
|
||||
RSpec/RepeatedExample:
|
||||
Exclude:
|
||||
- 'spec/policies/status_policy_spec.rb'
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AboutController, type: :controller do
|
||||
RSpec.describe AboutController do
|
||||
render_views
|
||||
|
||||
describe 'GET #show' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AccountsController, type: :controller do
|
||||
RSpec.describe AccountsController do
|
||||
render_views
|
||||
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::CollectionsController, type: :controller do
|
||||
RSpec.describe ActivityPub::CollectionsController do
|
||||
let!(:account) { Fabricate(:account) }
|
||||
let!(:private_pinned) { Fabricate(:status, account: account, text: 'secret private stuff', visibility: :private) }
|
||||
let(:remote_account) { nil }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::FollowersSynchronizationsController, type: :controller do
|
||||
RSpec.describe ActivityPub::FollowersSynchronizationsController do
|
||||
let!(:account) { Fabricate(:account) }
|
||||
let!(:follower_1) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/users/a') }
|
||||
let!(:follower_2) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/users/b') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::InboxesController, type: :controller do
|
||||
RSpec.describe ActivityPub::InboxesController do
|
||||
let(:remote_account) { nil }
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::OutboxesController, type: :controller do
|
||||
RSpec.describe ActivityPub::OutboxesController do
|
||||
let!(:account) { Fabricate(:account) }
|
||||
|
||||
shared_examples 'cacheable response' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::RepliesController, type: :controller do
|
||||
RSpec.describe ActivityPub::RepliesController do
|
||||
let(:status) { Fabricate(:status, visibility: parent_visibility) }
|
||||
let(:remote_account) { Fabricate(:account, domain: 'foobar.com') }
|
||||
let(:remote_reply_id) { 'https://foobar.com/statuses/1234' }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::AccountModerationNotesController, type: :controller do
|
||||
RSpec.describe Admin::AccountModerationNotesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::AccountsController, type: :controller do
|
||||
RSpec.describe Admin::AccountsController do
|
||||
render_views
|
||||
|
||||
before { sign_in current_user, scope: :user }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Admin::ActionLogsController, type: :controller do
|
||||
describe Admin::ActionLogsController do
|
||||
render_views
|
||||
|
||||
# Action logs typically cause issues when their targets are not in the database
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Admin::BaseController, type: :controller do
|
||||
describe Admin::BaseController do
|
||||
controller do
|
||||
def success
|
||||
authorize :dashboard, :index?
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::ChangeEmailsController, type: :controller do
|
||||
RSpec.describe Admin::ChangeEmailsController do
|
||||
render_views
|
||||
|
||||
let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::ConfirmationsController, type: :controller do
|
||||
RSpec.describe Admin::ConfirmationsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Admin::DashboardController, type: :controller do
|
||||
describe Admin::DashboardController do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::Disputes::AppealsController, type: :controller do
|
||||
RSpec.describe Admin::Disputes::AppealsController do
|
||||
render_views
|
||||
|
||||
before { sign_in current_user, scope: :user }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::DomainAllowsController, type: :controller do
|
||||
RSpec.describe Admin::DomainAllowsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::DomainBlocksController, type: :controller do
|
||||
RSpec.describe Admin::DomainBlocksController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
|
||||
RSpec.describe Admin::EmailDomainBlocksController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::ExportDomainAllowsController, type: :controller do
|
||||
RSpec.describe Admin::ExportDomainAllowsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::ExportDomainBlocksController, type: :controller do
|
||||
RSpec.describe Admin::ExportDomainBlocksController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::InstancesController, type: :controller do
|
||||
RSpec.describe Admin::InstancesController do
|
||||
render_views
|
||||
|
||||
let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::Settings::BrandingController, type: :controller do
|
||||
RSpec.describe Admin::Settings::BrandingController do
|
||||
render_views
|
||||
|
||||
describe 'When signed in as an admin' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::TagsController, type: :controller do
|
||||
RSpec.describe Admin::TagsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::OEmbedController, type: :controller do
|
||||
RSpec.describe Api::OEmbedController do
|
||||
render_views
|
||||
|
||||
let(:alice) { Fabricate(:account, username: 'alice') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Accounts::PinsController, type: :controller do
|
||||
RSpec.describe Api::V1::Accounts::PinsController do
|
||||
let(:john) { Fabricate(:user) }
|
||||
let(:kevin) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: john.id, scopes: 'write:accounts') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Accounts::SearchController, type: :controller do
|
||||
RSpec.describe Api::V1::Accounts::SearchController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::AccountsController, type: :controller do
|
||||
RSpec.describe Api::V1::AccountsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Admin::AccountActionsController, type: :controller do
|
||||
RSpec.describe Api::V1::Admin::AccountActionsController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Moderator') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Admin::AccountsController, type: :controller do
|
||||
RSpec.describe Api::V1::Admin::AccountsController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Moderator') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Admin::DomainAllowsController, type: :controller do
|
||||
RSpec.describe Api::V1::Admin::DomainAllowsController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Admin') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Admin::DomainBlocksController, type: :controller do
|
||||
RSpec.describe Api::V1::Admin::DomainBlocksController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Admin') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Admin::ReportsController, type: :controller do
|
||||
RSpec.describe Api::V1::Admin::ReportsController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Moderator') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Announcements::ReactionsController, type: :controller do
|
||||
RSpec.describe Api::V1::Announcements::ReactionsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::AnnouncementsController, type: :controller do
|
||||
RSpec.describe Api::V1::AnnouncementsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::AppsController, type: :controller do
|
||||
RSpec.describe Api::V1::AppsController do
|
||||
render_views
|
||||
|
||||
describe 'POST #create' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::BlocksController, type: :controller do
|
||||
RSpec.describe Api::V1::BlocksController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::BookmarksController, type: :controller do
|
||||
RSpec.describe Api::V1::BookmarksController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::ConversationsController, type: :controller do
|
||||
RSpec.describe Api::V1::ConversationsController do
|
||||
render_views
|
||||
|
||||
let!(:user) { Fabricate(:user, account_attributes: { username: 'alice' }) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::CustomEmojisController, type: :controller do
|
||||
RSpec.describe Api::V1::CustomEmojisController do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::DomainBlocksController, type: :controller do
|
||||
RSpec.describe Api::V1::DomainBlocksController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Emails::ConfirmationsController, type: :controller do
|
||||
RSpec.describe Api::V1::Emails::ConfirmationsController do
|
||||
let(:confirmed_at) { nil }
|
||||
let(:user) { Fabricate(:user, confirmed_at: confirmed_at) }
|
||||
let(:app) { Fabricate(:application) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::EndorsementsController, type: :controller do
|
||||
RSpec.describe Api::V1::EndorsementsController do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:accounts') }
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::FavouritesController, type: :controller do
|
||||
RSpec.describe Api::V1::FavouritesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::FiltersController, type: :controller do
|
||||
RSpec.describe Api::V1::FiltersController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::FollowRequestsController, type: :controller do
|
||||
RSpec.describe Api::V1::FollowRequestsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user, account_attributes: { locked: true }) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::FollowedTagsController, type: :controller do
|
||||
RSpec.describe Api::V1::FollowedTagsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Instances::ActivityController, type: :controller do
|
||||
RSpec.describe Api::V1::Instances::ActivityController do
|
||||
describe 'GET #show' do
|
||||
it 'returns 200' do
|
||||
get :show
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Instances::PeersController, type: :controller do
|
||||
RSpec.describe Api::V1::Instances::PeersController do
|
||||
describe 'GET #index' do
|
||||
it 'returns 200' do
|
||||
get :index
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::InstancesController, type: :controller do
|
||||
RSpec.describe Api::V1::InstancesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::ListsController, type: :controller do
|
||||
RSpec.describe Api::V1::ListsController do
|
||||
render_views
|
||||
|
||||
let!(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::MarkersController, type: :controller do
|
||||
RSpec.describe Api::V1::MarkersController do
|
||||
render_views
|
||||
|
||||
let!(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::MediaController, type: :controller do
|
||||
RSpec.describe Api::V1::MediaController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::MutesController, type: :controller do
|
||||
RSpec.describe Api::V1::MutesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::NotificationsController, type: :controller do
|
||||
RSpec.describe Api::V1::NotificationsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user, account_attributes: { username: 'alice' }) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Polls::VotesController, type: :controller do
|
||||
RSpec.describe Api::V1::Polls::VotesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::PollsController, type: :controller do
|
||||
RSpec.describe Api::V1::PollsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::ReportsController, type: :controller do
|
||||
RSpec.describe Api::V1::ReportsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :controller do
|
||||
RSpec.describe Api::V1::Statuses::FavouritedByAccountsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controller do
|
||||
RSpec.describe Api::V1::Statuses::RebloggedByAccountsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::StatusesController, type: :controller do
|
||||
RSpec.describe Api::V1::StatusesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::SuggestionsController, type: :controller do
|
||||
RSpec.describe Api::V1::SuggestionsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::TagsController, type: :controller do
|
||||
RSpec.describe Api::V1::TagsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::Trends::TagsController, type: :controller do
|
||||
RSpec.describe Api::V1::Trends::TagsController do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V2::Admin::AccountsController, type: :controller do
|
||||
RSpec.describe Api::V2::Admin::AccountsController do
|
||||
render_views
|
||||
|
||||
let(:role) { UserRole.find_by(name: 'Moderator') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V2::Filters::KeywordsController, type: :controller do
|
||||
RSpec.describe Api::V2::Filters::KeywordsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V2::Filters::StatusesController, type: :controller do
|
||||
RSpec.describe Api::V2::Filters::StatusesController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V2::FiltersController, type: :controller do
|
||||
RSpec.describe Api::V2::FiltersController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V2::SearchController, type: :controller do
|
||||
RSpec.describe Api::V2::SearchController do
|
||||
render_views
|
||||
|
||||
context 'with token' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
controller do
|
||||
def success
|
||||
head 200
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Auth::ChallengesController, type: :controller do
|
||||
describe Auth::ChallengesController do
|
||||
render_views
|
||||
|
||||
let(:password) { 'foobar12345' }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Auth::ConfirmationsController, type: :controller do
|
||||
describe Auth::ConfirmationsController do
|
||||
render_views
|
||||
|
||||
describe 'GET #new' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Auth::PasswordsController, type: :controller do
|
||||
describe Auth::PasswordsController do
|
||||
include Devise::Test::ControllerHelpers
|
||||
|
||||
describe 'GET #new' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Auth::RegistrationsController, type: :controller do
|
||||
RSpec.describe Auth::RegistrationsController do
|
||||
render_views
|
||||
|
||||
shared_examples 'checks for enabled registrations' do |path|
|
||||
|
@ -3,7 +3,7 @@
|
||||
require 'rails_helper'
|
||||
require 'webauthn/fake_client'
|
||||
|
||||
RSpec.describe Auth::SessionsController, type: :controller do
|
||||
RSpec.describe Auth::SessionsController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
controller do
|
||||
include AccountControllerConcern
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe CacheConcern, type: :controller do
|
||||
RSpec.describe CacheConcern do
|
||||
controller(ApplicationController) do
|
||||
include CacheConcern
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ChallengableConcern, type: :controller do
|
||||
RSpec.describe ChallengableConcern do
|
||||
controller(ApplicationController) do
|
||||
include ChallengableConcern
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
controller do
|
||||
include ExportControllerConcern
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
controller do
|
||||
include Localized
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
let(:wrapped_actor_class) do
|
||||
Class.new do
|
||||
attr_reader :wrapped_account
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationController, type: :controller do
|
||||
describe ApplicationController do
|
||||
controller do
|
||||
include UserTrackingConcern
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Disputes::AppealsController, type: :controller do
|
||||
RSpec.describe Disputes::AppealsController do
|
||||
render_views
|
||||
|
||||
before { sign_in current_user, scope: :user }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Disputes::StrikesController, type: :controller do
|
||||
RSpec.describe Disputes::StrikesController do
|
||||
render_views
|
||||
|
||||
before { sign_in current_user, scope: :user }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe HomeController, type: :controller do
|
||||
RSpec.describe HomeController do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe InstanceActorsController, type: :controller do
|
||||
RSpec.describe InstanceActorsController do
|
||||
describe 'GET #show' do
|
||||
context 'with JSON' do
|
||||
let(:format) { 'json' }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe IntentsController, type: :controller do
|
||||
RSpec.describe IntentsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Oauth::AuthorizationsController, type: :controller do
|
||||
RSpec.describe Oauth::AuthorizationsController do
|
||||
render_views
|
||||
|
||||
let(:app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: 'http://localhost/', scopes: 'read') }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Oauth::TokensController, type: :controller do
|
||||
RSpec.describe Oauth::TokensController do
|
||||
describe 'POST #revoke' do
|
||||
let!(:user) { Fabricate(:user) }
|
||||
let!(:application) { Fabricate(:application, confidential: false) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Settings::ImportsController, type: :controller do
|
||||
RSpec.describe Settings::ImportsController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Settings::ProfilesController, type: :controller do
|
||||
RSpec.describe Settings::ProfilesController do
|
||||
render_views
|
||||
|
||||
let!(:user) { Fabricate(:user) }
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe StatusesCleanupController, type: :controller do
|
||||
RSpec.describe StatusesCleanupController do
|
||||
render_views
|
||||
|
||||
before do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe TagsController, type: :controller do
|
||||
RSpec.describe TagsController do
|
||||
render_views
|
||||
|
||||
describe 'GET #show' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe WellKnown::HostMetaController, type: :controller do
|
||||
describe WellKnown::HostMetaController do
|
||||
render_views
|
||||
|
||||
describe 'GET #show' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe WellKnown::NodeInfoController, type: :controller do
|
||||
describe WellKnown::NodeInfoController do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe WellKnown::WebfingerController, type: :controller do
|
||||
describe WellKnown::WebfingerController do
|
||||
render_views
|
||||
|
||||
describe 'GET #show' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AccountsHelper, type: :helper do
|
||||
RSpec.describe AccountsHelper do
|
||||
def set_not_embedded_view
|
||||
params[:controller] = "not_#{StatusesHelper::EMBEDDED_CONTROLLER}"
|
||||
params[:action] = "not_#{StatusesHelper::EMBEDDED_ACTION}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::AccountModerationNotesHelper, type: :helper do
|
||||
RSpec.describe Admin::AccountModerationNotesHelper do
|
||||
include AccountsHelper
|
||||
|
||||
describe '#admin_account_link_to' do
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::ActionLogsHelper, type: :helper do
|
||||
RSpec.describe Admin::ActionLogsHelper do
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe FlashesHelper, type: :helper do
|
||||
describe FlashesHelper do
|
||||
describe 'user_facing_flashes' do
|
||||
it 'returns user facing flashes' do
|
||||
flash[:alert] = 'an alert'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user