diff --git a/.rubocop.yml b/.rubocop.yml index 9165e7eba82..17dd3fbeb3f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -197,6 +197,11 @@ Rails/I18nLocaleAssignment: Exclude: - "spec/**/*.rb" +Rails/I18nLocaleTexts: + Enabled: true + Exclude: + - "spec/**/*.rb" + # We have config.active_record.belongs_to_required_by_default = false , # which means, we do have to declare presence validators on belongs_to relations. Rails/RedundantPresenceValidationOnBelongsTo: diff --git a/modules/meeting/spec/services/all_meetings/handle_ical_response_service_spec.rb b/modules/meeting/spec/services/all_meetings/handle_ical_response_service_spec.rb index 669f8a038a9..e68d9d41465 100644 --- a/modules/meeting/spec/services/all_meetings/handle_ical_response_service_spec.rb +++ b/modules/meeting/spec/services/all_meetings/handle_ical_response_service_spec.rb @@ -302,7 +302,7 @@ RSpec.describe AllMeetings::HandleICalResponseService, type: :model do expect(subject).to be_success expect(Rails.logger).to have_received(:warn).with( "[iCal Meeting Response] No attendee found for user #{user.mail} " \ - "in event #{recurring_meeting.uid} with recurrence ID #{recurrence_id.iso8601}" + "in event #{recurring_meeting.uid} with recurrence ID #{recurrence_id.utc.strftime('%Y-%m-%dT%H:%M:%S+00:00')}" ) end end diff --git a/spec/controllers/work_package_types/subject_configuration_tab_controller_spec.rb b/spec/controllers/work_package_types/subject_configuration_tab_controller_spec.rb index ac25c82c22e..e609c40ec8b 100644 --- a/spec/controllers/work_package_types/subject_configuration_tab_controller_spec.rb +++ b/spec/controllers/work_package_types/subject_configuration_tab_controller_spec.rb @@ -65,8 +65,8 @@ module WorkPackageTypes end context "if form data is invalid" do - let(:form_data) { { subject_configuration: "generated", pattern: nil } } - let(:expected_pattern_data) { { subject: { blueprint: "", enabled: true } } } + let(:form_data) { { subject_configuration: "generated", pattern: "{{invalid_token}}" } } + let(:expected_pattern_data) { { subject: { blueprint: "{{invalid_token}}", enabled: true } } } let(:service_result) { ServiceResult.failure } it "renders the edit template" do diff --git a/spec/mailers/smtp_settings_spec.rb b/spec/mailers/smtp_settings_spec.rb index b3d6fc62467..6cf0f6d8889 100644 --- a/spec/mailers/smtp_settings_spec.rb +++ b/spec/mailers/smtp_settings_spec.rb @@ -59,9 +59,11 @@ RSpec.describe "SMTP settings" do end def send_mail - ActionMailer::Base - .mail(from: "test@op.com", to: "foo@bar.com", subject: "Test mail", body: "body") - .deliver_now + Class.new(ActionMailer::Base) do # rubocop:disable Rails/ApplicationMailer + def test_mail + mail(from: "test@op.com", to: "foo@bar.com", subject: "Test mail", body: "body") + end + end.test_mail.deliver_now end describe "enable_starttls_auto" do