diff options
Diffstat (limited to 'spec/requests/api/generic_packages_spec.rb')
-rw-r--r-- | spec/requests/api/generic_packages_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/requests/api/generic_packages_spec.rb b/spec/requests/api/generic_packages_spec.rb index 3a5c6103781..823eafab734 100644 --- a/spec/requests/api/generic_packages_spec.rb +++ b/spec/requests/api/generic_packages_spec.rb @@ -572,6 +572,12 @@ RSpec.describe API::GenericPackages do expect(response).to have_gitlab_http_status(expected_status) end + + if params[:expected_status] == :success + it_behaves_like 'bumping the package last downloaded at field' do + subject { download_file(auth_header) } + end + end end where(:authenticate_with, :expected_status) do @@ -587,6 +593,12 @@ RSpec.describe API::GenericPackages do expect(response).to have_gitlab_http_status(expected_status) end + + if params[:expected_status] == :success + it_behaves_like 'bumping the package last downloaded at field' do + subject { download_file(deploy_token_auth_header) } + end + end end end @@ -608,6 +620,12 @@ RSpec.describe API::GenericPackages do expect(response).to have_gitlab_http_status(expected_status) end + + if params[:expected_status] == :success + it_behaves_like 'bumping the package last downloaded at field' do + subject { download_file(personal_access_token_header) } + end + end end end |