ensure both strategy options syntaxes work.

This commit is contained in:
Micah Geisel 2021-05-08 12:42:22 -07:00
parent 85cd6d097f
commit 9046980bd6

View file

@ -144,7 +144,12 @@ module DatabaseCleaner
expect(cleaner.strategy).to be_a(strategy_class)
end
it "should proxy params with symbolised strategies" do
it "should proxy params with symbolised strategies in an array" do
expect(strategy_class).to receive(:new).with(param: "one")
cleaner.strategy = [:truncation, param: "one"]
end
it "should proxy params with symbolised strategies in a separate hash" do
expect(strategy_class).to receive(:new).with(param: "one")
cleaner.strategy = :truncation, { param: "one" }
end