File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
spec/unit/lib/cloud_controller Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,12 @@ module VCAP::CloudController
161161
162162 it 'expires old packages' do
163163 expiration = BitsExpiration . new
164- expiration . expire_packages! ( app )
165164 num_of_packages_to_keep = expiration . packages_storage_count + 1
166165 remaining_packages = PackageModel . where ( state : PackageModel ::READY_STATE , app_guid : app . guid )
167166 expect ( remaining_packages . count ) . to eq ( num_of_packages_to_keep )
168167 end
169168
170169 it 'does not delete the package related to the current droplet' do
171- BitsExpiration . new . expire_packages! ( app )
172170 app . reload && @current_package . reload
173171 expect ( @current_package . state ) . to eq ( PackageModel ::READY_STATE )
174172 end
@@ -181,7 +179,7 @@ module VCAP::CloudController
181179 end
182180
183181 it 'enqueues a job to delete the blob' do
184- expect { BitsExpiration . new . expire_packages! ( app ) } . to change ( Delayed ::Job , : count) . from ( 0 ) . to ( 5 )
182+ expect ( Delayed ::Job . count ) . to eq ( 5 )
185183 expect ( Delayed ::Job ) . to ( be_all { |j | j . handler . include? ( 'DeleteExpiredPackageBlob' ) } )
186184 end
187185 end
You can’t perform that action at this time.
0 commit comments