diff --git a/spec/controllers/admin/subscriptions_controller_spec.rb b/spec/controllers/admin/subscriptions_controller_spec.rb index f248276783..0960e2fc86 100644 --- a/spec/controllers/admin/subscriptions_controller_spec.rb +++ b/spec/controllers/admin/subscriptions_controller_spec.rb @@ -69,7 +69,7 @@ RSpec.describe Admin::SubscriptionsController, type: :controller do get(:index, params:) json_response = JSON.parse(response.body) expect(json_response.count).to be 2 - expect(json_response.pluck(:id)).to include subscription.id, subscription2.id + expect(json_response.pluck('id')).to include subscription.id, subscription2.id end context "when ransack predicates are submitted" do @@ -79,7 +79,7 @@ RSpec.describe Admin::SubscriptionsController, type: :controller do get(:index, params:) json_response = JSON.parse(response.body) expect(json_response.count).to be 1 - ids = json_response.pluck(:id) + ids = json_response.pluck('id') expect(ids).to include subscription2.id expect(ids).not_to include subscription.id end diff --git a/spec/controllers/api/v0/orders_controller_spec.rb b/spec/controllers/api/v0/orders_controller_spec.rb index 9f7bebe345..55ccf415e9 100644 --- a/spec/controllers/api/v0/orders_controller_spec.rb +++ b/spec/controllers/api/v0/orders_controller_spec.rb @@ -146,8 +146,8 @@ module Api as: :json expect(json_response['orders'] - .pluck(:id)).to eq serialized_orders([order2, order3, order1, order4]) - .pluck(:id) + .pluck('id')).to eq serialized_orders([order2, order3, order1, order4]) + .pluck('id') end context "with an order without billing address" do @@ -161,17 +161,17 @@ module Api as: :json expect(json_response['orders'] - .pluck(:id)).to match_array serialized_orders([order2, order3, order1, order4, - order7]) - .pluck(:id) + .pluck('id')).to match_array serialized_orders([order2, order3, order1, order4, + order7]) + .pluck('id') end it 'can sort orders by bill_address.lastname' do get :index, params: { q: { s: 'bill_address_lastname ASC' } }, as: :json expect(json_response['orders'] - .pluck(:id)).to eq serialized_orders([order2, order3, order1, order4, order7]) - .pluck(:id) + .pluck('id')).to eq serialized_orders([order2, order3, order1, order4, order7]) + .pluck('id') end end end diff --git a/spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb b/spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb index eb5e117ddf..9f76110001 100644 --- a/spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb +++ b/spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb @@ -41,7 +41,7 @@ RSpec.describe Api::Admin::ForOrderCycle::SuppliedProductSerializer do describe "supplied products" do it "renders variants regardless of whether they are in the coordinators inventory" do expect(serialized_product).to have_json_size(2).at_path 'variants' - variant_ids = parse_json(serialized_product)['variants'].pluck(:id) + variant_ids = parse_json(serialized_product)['variants'].pluck('id') expect(variant_ids).to include non_inventory_variant.id, inventory_variant.id end end