diff options
Diffstat (limited to 'spec/models/postgresql/detached_partition_spec.rb')
-rw-r--r-- | spec/models/postgresql/detached_partition_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/postgresql/detached_partition_spec.rb b/spec/models/postgresql/detached_partition_spec.rb index aaa99e842b4..d9e77b70368 100644 --- a/spec/models/postgresql/detached_partition_spec.rb +++ b/spec/models/postgresql/detached_partition_spec.rb @@ -4,15 +4,15 @@ require 'spec_helper' RSpec.describe Postgresql::DetachedPartition do describe '#ready_to_drop' do - let_it_be(:drop_before) { Postgresql::DetachedPartition.create!(drop_after: 1.day.ago, table_name: 'old_table') } - let_it_be(:drop_after) { Postgresql::DetachedPartition.create!(drop_after: 1.day.from_now, table_name: 'new_table') } + let_it_be(:drop_before) { described_class.create!(drop_after: 1.day.ago, table_name: 'old_table') } + let_it_be(:drop_after) { described_class.create!(drop_after: 1.day.from_now, table_name: 'new_table') } it 'includes partitions that should be dropped before now' do - expect(Postgresql::DetachedPartition.ready_to_drop.to_a).to include(drop_before) + expect(described_class.ready_to_drop.to_a).to include(drop_before) end it 'does not include partitions that should be dropped after now' do - expect(Postgresql::DetachedPartition.ready_to_drop.to_a).not_to include(drop_after) + expect(described_class.ready_to_drop.to_a).not_to include(drop_after) end end end |