Commit be959393 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '232998-package-metadata' into 'master'

Add missing conan_metadatum to package presenter

See merge request gitlab-org/gitlab!39643
parents bf4c9023 6ca3def0
......@@ -23,6 +23,7 @@ module Packages
package_detail[:maven_metadatum] = @package.maven_metadatum if @package.maven_metadatum
package_detail[:nuget_metadatum] = @package.nuget_metadatum if @package.nuget_metadatum
package_detail[:composer_metadatum] = @package.composer_metadatum if @package.composer_metadatum
package_detail[:conan_metadatum] = @package.conan_metadatum if @package.conan_metadatum
package_detail[:dependency_links] = @package.dependency_links.map(&method(:build_dependency_links))
package_detail[:pipeline] = build_pipeline_info(@package.build_info.pipeline) if @package.build_info
......
---
title: Fix Conan recipe display in the package details page
merge_request: 39643
author:
type: fixed
......@@ -74,6 +74,15 @@ RSpec.describe ::Packages::Detail::PackagePresenter do
end
end
context 'with conan metadata' do
let(:package) { create(:conan_package, project: project) }
let(:expected_package_details) { super().merge(conan_metadatum: package.conan_metadatum) }
it 'returns conan_metadatum' do
expect(presenter.detail_view).to eq expected_package_details
end
end
context 'with composer metadata' do
let(:package) { create(:composer_package, :with_metadatum, sha: '123', project: project) }
let(:expected_package_details) { super().merge(composer_metadatum: package.composer_metadatum) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment