Skip to content

Commit

Permalink
Fixes to appease rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloDalRi authored and ChrisBAshton committed Dec 29, 2023
1 parent 6c85efe commit 24ebbef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/workers/content_item_populate_doctype_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def perform
content_store = GdsApi::ContentStore.new(Plek.find("content-store"))
document_type_errors = []

ContentItem.all.each do |content_item|
ContentItem.find_each do |content_item|
found_content_item = content_store.content_item(content_item.path)

document_type = found_content_item["document_type"]
Expand Down
2 changes: 1 addition & 1 deletion spec/workers/content_item_populate_doctype_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

it "updates every content item's `document_type`" do
content_item = double("ContentItem", path: "foo")
allow(ContentItem).to receive(:all).and_return([content_item])
allow(ContentItem).to receive(:find_each).and_yield(content_item)
mock_content_store = double("ContentStore", content_item: { "document_type" => "foo_doctype" })
allow(GdsApi::ContentStore).to receive(:new).and_return(mock_content_store)

Expand Down

0 comments on commit 24ebbef

Please sign in to comment.