Commit 39c46962 authored by Igor Drozdov's avatar Igor Drozdov

Expect less transaction for identity destroy service

According to the specs description the behavior is correct
now and there is no need in expecting an additional transaction
to be raised
parent 53f92a0a
...@@ -18,13 +18,13 @@ RSpec.describe GroupSaml::Identity::DestroyService do ...@@ -18,13 +18,13 @@ RSpec.describe GroupSaml::Identity::DestroyService do
end end
it "does not use a transaction" do it "does not use a transaction" do
expect(::Identity).to receive(:transaction).and_yield.once expect(::Identity).not_to receive(:transaction)
subject.execute subject.execute
end end
it "uses a transaction when transactional is set" do it "uses a transaction when transactional is set" do
expect(::Identity).to receive(:transaction).and_yield.twice expect(::Identity).to receive(:transaction).and_yield.once
subject.execute(transactional: true) subject.execute(transactional: true)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment