Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Simplify fix for settings helper spec

Dombi Attilaa3c77129dd36
diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb
index 42cb6cf446f..d9f4f24d448 100644
--- a/spec/helpers/settings_helper_spec.rb
+++ b/spec/helpers/settings_helper_spec.rb
@@ -38,6 +38,11 @@ RSpec.describe SettingsHelper do
allow(Setting)
.to receive(:host_name_writable?)
.and_return true
+
+ allow(I18n).to receive(:t).and_call_original
+ allow(I18n).to receive(:t).with('setting_field_a').and_return('Field A')
+ allow(I18n).to receive(:t).with('setting_field_b').and_return('Field B')
+ allow(I18n).to receive(:t).with('setting_field').and_return('Field')
end
shared_examples_for 'field disabled if non writable' do