mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Autocorrect Style/HashConversion offenses
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user