Skip to content

Commit

Permalink
added test when error raised inside PglogicalSubscription#backlog
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Jan 25, 2018
1 parent f40c043 commit a9e8ee8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/models/pglogical_subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -423,5 +423,11 @@

expect(described_class.first.backlog).to eq(12_120)
end

it "returns nill if error raised inside" do
expect(MiqRegionRemote).to receive(:with_remote_connection).and_raise(PG::Error)

expect(described_class.first.backlog).to be nil
end
end
end

0 comments on commit a9e8ee8

Please sign in to comment.