Skip to content

Commit

Permalink
Merge pull request #2071 from samvera/i55-get-specs-passing
Browse files Browse the repository at this point in the history
More spec fixes
  • Loading branch information
jeremyf authored Dec 19, 2023
2 parents ac83919 + e905068 commit 5159b57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def locale_for(type:, term:, record_class:)
end

def missing_translation(value, _options = {})
value.include?('translation missing')
return true if value.try(:false?)
false
end
end
6 changes: 3 additions & 3 deletions spec/presenters/hyku/menu_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
let(:id) { "sample_id" }
let(:icon_class) { "sample-icon-class" }
let(:open) { true }
let(:html_options) { { class: "sample-class", data: { test: "test" } } }
let(:title) { "Cats" }
let(:block) { proc { "<li>Item</li>" } }

let(:presenter) { instance_double("CollapsableSectionPresenter") }
Expand All @@ -137,13 +137,13 @@
id:,
icon_class:,
open:,
html_options:
title:
).and_return(presenter)
end

it "calls the render method on the CollapsableSectionPresenter with the given block" do
expect(presenter).to receive(:render)
instance.collapsable_section(text, id:, icon_class:, open:, **html_options, &block)
instance.collapsable_section(text, id:, icon_class:, open:, title:, &block)
end
end
end

0 comments on commit 5159b57

Please sign in to comment.