Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion promotions/spec/lib/solidus_promotions/engine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

RSpec.describe SolidusPromotions::Engine do
describe "initializer.flickwerk_alias" do
around do |example|
original_value = Spree::Config.order_recalculator_class_name
Spree::Config.order_recalculator_class = "ThisIsATestClassName"

example.run

Spree::Config.order_recalculator_class = original_value
end

it "sets the Flickwerk alias for order_recalculator_class" do
Flickwerk.aliases["Spree::Config.order_recalculator_class"] = nil

Expand All @@ -12,7 +21,7 @@

initializer = SolidusPromotions::Engine.initializers.find { |i| i.name == "solidus_promotions.flickwerk_alias" }
initializer.run
expect(Flickwerk.aliases["Spree::Config.order_recalculator_class"]).to eq("Spree::OrderUpdater")
expect(Flickwerk.aliases["Spree::Config.order_recalculator_class"]).to eq("ThisIsATestClassName")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #6376, we probably don't need the Flickwerk alias to be there anymore. Not blocking, just a note that the feature can be removed.

end
end
end