diff --git a/.erblint-rubocop20241205-23566-fnt2fo b/.erblint-rubocop20241205-23566-fnt2fo new file mode 100644 index 00000000..a64caf69 --- /dev/null +++ b/.erblint-rubocop20241205-23566-fnt2fo @@ -0,0 +1,19 @@ +--- +inherit_from: +- ".rubocop.yml" +Layout/InitialIndentation: + Enabled: false +Layout/LineLength: + Enabled: false +Layout/TrailingEmptyLines: + Enabled: false +Layout/TrailingWhitespace: + Enabled: false +Naming/FileName: + Enabled: false +Style/FrozenStringLiteralComment: + Enabled: false +Lint/UselessAssignment: + Enabled: false +Rails/OutputSafety: + Enabled: false diff --git a/app/models/tenant.rb b/app/models/tenant.rb index 9ef42ec7..1ba3c795 100644 --- a/app/models/tenant.rb +++ b/app/models/tenant.rb @@ -44,7 +44,7 @@ class Tenant < ApplicationRecord validates_presence_of :name - AVAILABLE_FEATURE_FLAGS = [:audit_log, :archive, :api, :message_draft_import, :fs_api, :fs_sync] + AVAILABLE_FEATURE_FLAGS = [:audit_log, :archive, :api, :fs_sync] ALL_FEATURE_FLAGS = [:audit_log, :archive, :api, :message_draft_import, :fs_api, :fs_sync] def draft_tag! @@ -68,7 +68,7 @@ def user_signature_tags end def feature_enabled?(feature) - raise "Unknown feature #{feature}" unless feature.in? AVAILABLE_FEATURE_FLAGS + raise "Unknown feature #{feature}" unless feature.in? ALL_FEATURE_FLAGS feature.to_s.in? feature_flags end diff --git a/test/system/admin/feature_flags_management_test.rb b/test/system/admin/feature_flags_management_test.rb index 0c4fb675..307b7e38 100644 --- a/test/system/admin/feature_flags_management_test.rb +++ b/test/system/admin/feature_flags_management_test.rb @@ -10,10 +10,10 @@ class FeatureFlagsManagementTest < ApplicationSystemTestCase test "admin can enable and disable a feature" do available_features = users(:admin).tenant.list_available_features - enabled = users(:admin).tenant.feature_enabled?(available_features[0].to_sym) + enabled = users(:admin).tenant.feature_enabled?(available_features[0]) click_button available_features[0] assert_button available_features[0] users(:admin).tenant.reload - assert_not_equal enabled, users(:admin).tenant.feature_enabled?(available_features[0].to_sym) + assert_not_equal enabled, users(:admin).tenant.feature_enabled?(available_features[0]) end end