Skip to content

Commit

Permalink
Add a failing spec for MiqPglogical#configure_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonin committed Nov 8, 2016
1 parent 30cec80 commit 39a2f8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/replication/util/miq_pglogical_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
expect(pglogical.enabled?).to be true
expect(pglogical.replication_sets).to include(described_class::REPLICATION_SET_NAME)
end

it "does not enable the extension when an exception is raised" do
expect(subject).to receive(:create_replication_set).and_raise(PG::UniqueViolation)
expect { subject.configure_provider }.to raise_error(PG::UniqueViolation)
expect(pglogical.enabled?).to be false
end
end

context "when configured as a provider" do
Expand Down

0 comments on commit 39a2f8b

Please sign in to comment.