mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:41:24 +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:
@ -487,10 +487,10 @@ RSpec.describe Plugin::Instance do
|
||||
expect(
|
||||
JsLocaleHelper.find_message_format_locale(["foo_BAR"], fallback_to_english: true),
|
||||
).to eq(locale[:message_format])
|
||||
expect(JsLocaleHelper.find_moment_locale(["foo_BAR"])).to eq (locale[:moment_js])
|
||||
expect(JsLocaleHelper.find_moment_locale(["foo_BAR"], timezone_names: true)).to eq (
|
||||
locale[:moment_js_timezones]
|
||||
)
|
||||
expect(JsLocaleHelper.find_moment_locale(["foo_BAR"])).to eq(locale[:moment_js])
|
||||
expect(JsLocaleHelper.find_moment_locale(["foo_BAR"], timezone_names: true)).to eq(
|
||||
locale[:moment_js_timezones],
|
||||
)
|
||||
end
|
||||
|
||||
it "correctly registers a new locale using a fallback locale" do
|
||||
@ -516,7 +516,7 @@ RSpec.describe Plugin::Instance do
|
||||
expect(JsLocaleHelper.find_message_format_locale(["tup"], fallback_to_english: true)).to eq(
|
||||
locale[:message_format],
|
||||
)
|
||||
expect(JsLocaleHelper.find_moment_locale(["tup"])).to eq (locale[:moment_js])
|
||||
expect(JsLocaleHelper.find_moment_locale(["tup"])).to eq(locale[:moment_js])
|
||||
end
|
||||
|
||||
it "correctly registers a new locale when some files exist in core" do
|
||||
@ -539,7 +539,7 @@ RSpec.describe Plugin::Instance do
|
||||
expect(JsLocaleHelper.find_message_format_locale(["tlh"], fallback_to_english: true)).to eq(
|
||||
locale[:message_format],
|
||||
)
|
||||
expect(JsLocaleHelper.find_moment_locale(["tlh"])).to eq (locale[:moment_js])
|
||||
expect(JsLocaleHelper.find_moment_locale(["tlh"])).to eq(locale[:moment_js])
|
||||
end
|
||||
|
||||
it "does not register a new locale when the fallback locale does not exist" do
|
||||
|
Reference in New Issue
Block a user