Autocorrect Style/HashConversion offenses

This commit is contained in:
Carlos Chitty
2025-04-29 14:27:31 -04:00
parent 17a5b5e620
commit 63168086e7
9 changed files with 20 additions and 36 deletions

View File

@@ -68,7 +68,7 @@ RSpec.describe Admin::InventoryItemsController, type: :controller do
it "returns an error message" do
expect{ spree_post :create, bad_params }.to change{ InventoryItem.count }.by(0)
expect(response.body).to eq Hash[:errors, ["Visible must be true or false"]].to_json
expect(response.body).to eq { :errors => ["Visible must be true or false"] }.to_json
end
end
end
@@ -134,7 +134,7 @@ RSpec.describe Admin::InventoryItemsController, type: :controller do
it "returns an error message" do
expect{ spree_put :update, bad_params }.to change{ InventoryItem.count }.by(0)
expect(response.body).to eq Hash[:errors, ["Visible must be true or false"]].to_json
expect(response.body).to eq { :errors => ["Visible must be true or false"] }.to_json
end
end
end

View File

@@ -60,7 +60,7 @@ RSpec.describe Admin::VariantOverridesController, type: :controller do
put :bulk_update, as: format, params: { variant_overrides: variant_override_params }
expect(assigns[:hubs]).to eq [hub]
expect(assigns[:producers]).to eq [variant.supplier]
expect(assigns[:hub_permissions]).to eq Hash[hub.id, [variant.supplier.id]]
expect(assigns[:hub_permissions]).to eq({ hub.id => [variant.supplier.id] })
expect(assigns[:inventory_items]).to eq [inventory_item]
end
@@ -163,7 +163,7 @@ RSpec.describe Admin::VariantOverridesController, type: :controller do
put(:bulk_reset, params:)
expect(assigns[:hubs]).to eq [hub]
expect(assigns[:producers]).to eq [producer]
expect(assigns[:hub_permissions]).to eq Hash[hub.id, [producer.id]]
expect(assigns[:hub_permissions]).to eq({ hub.id => [producer.id] })
expect(assigns[:inventory_items]).to eq []
end