mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
adapt specs to changes in 8.1
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user