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

Make rubocop happy

Mir Bhatia72408fc609c2
diff --git a/spec/components/activities/item_component_spec.rb b/spec/components/activities/item_component_spec.rb
index 553866ed00f..a0fc0e77ca3 100644
--- a/spec/components/activities/item_component_spec.rb
+++ b/spec/components/activities/item_component_spec.rb
@@ -123,6 +123,7 @@ RSpec.describe Activities::ItemComponent, type: :component do
end
context 'for TimeEntry activites' do
+ let(:journal) { build_stubbed(:time_entry_journal) }
let(:event) do
Activities::Event.new(
event_title: "Event Title",
@@ -132,7 +133,7 @@ RSpec.describe Activities::ItemComponent, type: :component do
journal:
)
end
- let(:journal) { build_stubbed(:time_entry_journal) }
+
it 'displays the title correctly' do
component = described_class.new(event:)
render_inline(component)
diff --git a/spec/components/activities/item_subtitle_component_spec.rb b/spec/components/activities/item_subtitle_component_spec.rb
index 73c588936fa..00d9e0dd346 100644
--- a/spec/components/activities/item_subtitle_component_spec.rb
+++ b/spec/components/activities/item_subtitle_component_spec.rb
@@ -81,6 +81,7 @@ RSpec.describe Activities::ItemSubtitleComponent, type: :component do
let(:is_creation) { false }
let(:user) { build_stubbed(:user) }
let(:journable_type) { 'TimeEntry' }
+
it { is_expected.to have_text("time logged updated by #{user.name} on #{format_time(datetime)}") }
end
end
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 364cee17513..cdbd5b5f79c 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -18,7 +18,7 @@ RSpec.shared_context 'with default_url_options and host name set to Capybara tes
after do
default_url_options[:host] = @original_host # rubocop:disable RSpec/InstanceVariable
default_url_options[:port] = @original_port # rubocop:disable RSpec/InstanceVariable
- Setting.host_name = @original_host_setting
+ Setting.host_name = @original_host_setting # rubocop:disable RSpec/InstanceVariable
end
end