mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 19:53:41 +08:00
DEV: Fix various rubocop lints (#24749)
These (21 + 3 from previous PRs) are soon to be enabled in rubocop-discourse: Capybara/VisibilityMatcher Lint/DeprecatedOpenSSLConstant Lint/DisjunctiveAssignmentInConstructor Lint/EmptyConditionalBody Lint/EmptyEnsure Lint/LiteralInInterpolation Lint/NonLocalExitFromIterator Lint/ParenthesesAsGroupedExpression Lint/RedundantCopDisableDirective Lint/RedundantRequireStatement Lint/RedundantSafeNavigation Lint/RedundantStringCoercion Lint/RedundantWithIndex Lint/RedundantWithObject Lint/SafeNavigationChain Lint/SafeNavigationConsistency Lint/SelfAssignment Lint/UnreachableCode Lint/UselessMethodDefinition Lint/Void Previous PRs: Lint/ShadowedArgument Lint/DuplicateMethods Lint/BooleanSymbol RSpec/SpecFilePathSuffix
This commit is contained in:
@ -153,7 +153,7 @@ RSpec.describe Chat::Api::ChannelsArchivesController do
|
||||
expect { post "/chat/api/channels/#{channel.id}/archives" }.to change(
|
||||
Jobs::Chat::ChannelArchive.jobs,
|
||||
:size,
|
||||
).by (1)
|
||||
).by(1)
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
@ -354,14 +354,14 @@ RSpec.describe Chat::ChatController do
|
||||
sign_in(user)
|
||||
expect {
|
||||
post "/chat/dismiss-retention-reminder.json", params: { chatable_type: "Category" }
|
||||
}.to change { user.user_option.reload.dismissed_channel_retention_reminder }.to (true)
|
||||
}.to change { user.user_option.reload.dismissed_channel_retention_reminder }.to(true)
|
||||
end
|
||||
|
||||
it "sets `dismissed_dm_retention_reminder` to true" do
|
||||
sign_in(user)
|
||||
expect {
|
||||
post "/chat/dismiss-retention-reminder.json", params: { chatable_type: "DirectMessage" }
|
||||
}.to change { user.user_option.reload.dismissed_dm_retention_reminder }.to (true)
|
||||
}.to change { user.user_option.reload.dismissed_dm_retention_reminder }.to(true)
|
||||
end
|
||||
|
||||
it "doesn't error if the fields are already true" do
|
||||
|
Reference in New Issue
Block a user