summaryrefslogtreecommitdiff
path: root/spec/models/postgresql/replication_slot_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/postgresql/replication_slot_spec.rb')
-rw-r--r--spec/models/postgresql/replication_slot_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/postgresql/replication_slot_spec.rb b/spec/models/postgresql/replication_slot_spec.rb
index e100af7ddc7..95ae204a8a8 100644
--- a/spec/models/postgresql/replication_slot_spec.rb
+++ b/spec/models/postgresql/replication_slot_spec.rb
@@ -47,5 +47,13 @@ describe Postgresql::ReplicationSlot, :postgresql do
expect(described_class.lag_too_great?).to eq(false)
end
+
+ it 'returns false when there is a nil replication lag' do
+ expect(described_class)
+ .to receive(:pluck)
+ .and_return([0.megabytes, nil])
+
+ expect(described_class.lag_too_great?).to eq(false)
+ end
end
end