diff options
Diffstat (limited to 'spec/support/shared_examples/requests/api/packages_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/requests/api/packages_shared_examples.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/shared_examples/requests/api/packages_shared_examples.rb b/spec/support/shared_examples/requests/api/packages_shared_examples.rb index eb650b7a09f..860cb1b1d86 100644 --- a/spec/support/shared_examples/requests/api/packages_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/packages_shared_examples.rb @@ -165,3 +165,10 @@ RSpec.shared_examples 'not a package tracking event' do expect_no_snowplow_event end end + +RSpec.shared_examples 'bumping the package last downloaded at field' do + it 'bumps last_downloaded_at' do + expect { subject } + .to change { package.reload.last_downloaded_at }.from(nil).to(instance_of(ActiveSupport::TimeWithZone)) + end +end |