Skip to content

Commit

Permalink
Improve variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
luisramos0 committed May 8, 2020
1 parent 40dd307 commit 34d8b19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/helpers/enterprises_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
before { allow(helper).to receive(:spree_current_user) { user } }

describe "loading available shipping methods" do
let!(:sm1) { create(:shipping_method, require_ship_address: false, distributors: [distributor]) }
let!(:sm2) { create(:shipping_method, require_ship_address: false, distributors: [some_other_distributor]) }
let!(:distributor_shipping_method) { create(:shipping_method, require_ship_address: false, distributors: [distributor]) }
let!(:other_distributor_shipping_method) { create(:shipping_method, require_ship_address: false, distributors: [some_other_distributor]) }

context "when the order has no current_distributor" do
before do
Expand All @@ -25,8 +25,8 @@
before { allow(helper).to receive(:current_distributor) { distributor } }

it "finds the shipping methods for the current distributor" do
expect(helper.available_shipping_methods).to_not include sm2
expect(helper.available_shipping_methods).to include sm1
expect(helper.available_shipping_methods).to_not include other_distributor_shipping_method
expect(helper.available_shipping_methods).to include distributor_shipping_method
end
end

Expand All @@ -44,8 +44,8 @@
is_default: true,
preferred_shipping_method_tags: "local-delivery")
}
let!(:tagged_sm) { sm1 }
let!(:untagged_sm) { sm2 }
let!(:tagged_sm) { distributor_shipping_method }
let!(:untagged_sm) { other_distributor_shipping_method }

before do
tagged_sm.update_attribute(:tag_list, 'local-delivery')
Expand Down

0 comments on commit 34d8b19

Please sign in to comment.