-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefix associations and factories with solidus_ instead of friendly_
In the new solidus_promotions gem, we need some way of distinguishing factories and associations from the legacy_promotion ones. In `solidus_friendly_promotions`, that prefix was `friendly_`, in `solidus_promotions`, it's `solidus_`.
- Loading branch information
Showing
64 changed files
with
240 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
promotions/lib/solidus_promotions/testing_support/factories/friendly_order_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ions/lib/solidus_promotions/testing_support/factories/friendly_order_promotion_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :friendly_order_promotion, class: "SolidusPromotions::OrderPromotion" do | ||
factory :solidus_order_promotion, class: "SolidusPromotions::OrderPromotion" do | ||
association :order, factory: :order | ||
association :promotion, factory: :friendly_promotion | ||
association :promotion, factory: :solidus_promotion | ||
end | ||
end |
2 changes: 1 addition & 1 deletion
2
...s/lib/solidus_promotions/testing_support/factories/friendly_promotion_category_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :friendly_promotion_category, class: "SolidusPromotions::PromotionCategory" do | ||
factory :solidus_promotion_category, class: "SolidusPromotions::PromotionCategory" do | ||
name { "Promotion Category" } | ||
end | ||
end |
4 changes: 2 additions & 2 deletions
4
...tions/lib/solidus_promotions/testing_support/factories/friendly_promotion_code_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :friendly_promotion_code, class: "SolidusPromotions::PromotionCode" do | ||
association :promotion, factory: :friendly_promotion | ||
factory :solidus_promotion_code, class: "SolidusPromotions::PromotionCode" do | ||
association :promotion, factory: :solidus_promotion | ||
sequence(:value) { |i| "code#{i}" } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...b/solidus_promotions/testing_support/factories/friendly_shipping_rate_discount_factory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
let(:email) { "[email protected]" } | ||
let(:code_batch) do | ||
SolidusPromotions::PromotionCodeBatch.create!( | ||
promotion: create(:friendly_promotion), | ||
promotion: create(:solidus_promotion), | ||
base_code: "test", | ||
number_of_codes: 10, | ||
email: email | ||
|
@@ -35,7 +35,7 @@ def codes | |
context "with a custom join character" do | ||
let(:code_batch) do | ||
SolidusPromotions::PromotionCodeBatch.create!( | ||
promotion: create(:friendly_promotion), | ||
promotion: create(:solidus_promotion), | ||
base_code: "test", | ||
number_of_codes: 10, | ||
email: email, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.