mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #7343 from luisramos0/dead_code_2
[Rails 5.2] Remove dead code
This commit is contained in:
@@ -1,13 +1,4 @@
|
||||
module ShopHelper
|
||||
def order_cycles_name_and_pickup_times(order_cycles)
|
||||
order_cycles.map do |oc|
|
||||
[
|
||||
pickup_time(oc),
|
||||
oc.id
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
def oc_select_options
|
||||
@order_cycles.map { |oc| { time: pickup_time(oc), id: oc.id } }
|
||||
end
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
|
||||
require 'spec_helper'
|
||||
describe ShopHelper, type: :helper do
|
||||
it "should build order cycle select options" do
|
||||
distributor = create(:distributor_enterprise)
|
||||
oc = create(:simple_order_cycle, distributors: [distributor])
|
||||
allow(helper).to receive(:current_distributor).and_return distributor
|
||||
|
||||
expect(helper.order_cycles_name_and_pickup_times([oc])).to eq([[helper.pickup_time(oc), oc.id]])
|
||||
end
|
||||
|
||||
describe "shop_tabs" do
|
||||
context "distributor with groups" do
|
||||
let(:group) { create(:enterprise_group) }
|
||||
|
||||
Reference in New Issue
Block a user