12314 - remove shared distributor partial

- this was only used in the enterprise show view
- the above view was deleted here 4f2389e257
- by removing this, we can remove distributor_link_class method
- it will also fix the rubocop error
This commit is contained in:
Ahmed Ejaz
2024-03-31 18:08:22 +05:00
parent 3bb44cfe6d
commit ac1595e718
3 changed files with 0 additions and 40 deletions

View File

@@ -1,27 +0,0 @@
# frozen_string_literal: true
require 'spec_helper'
describe SharedHelper, type: :helper do
it "does not require emptying the cart when it is empty" do
d = double(:distributor)
order = double(:order, line_items: [])
allow(helper).to receive(:current_order) { order }
expect(helper.distributor_link_class(d)).not_to match(/empties-cart/)
end
it "does not require emptying the cart when we are on the same distributor" do
d = double(:distributor)
order = double(:order, line_items: [double(:line_item)], distributor: d)
allow(helper).to receive(:current_order) { order }
expect(helper.distributor_link_class(d)).not_to match(/empties-cart/)
end
it "requires emptying the cart otherwise" do
d1 = double(:distributor)
d2 = double(:distributor)
order = double(:order, line_items: [double(:line_item)], distributor: d2)
allow(helper).to receive(:current_order) { order }
expect(helper.distributor_link_class(d1)).to match(/empties-cart/)
end
end