diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/models/container_repository_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/models/container_repository_spec.rb')
-rw-r--r-- | spec/models/container_repository_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/models/container_repository_spec.rb b/spec/models/container_repository_spec.rb index 5bcd9dfd396..1eecefe5d4a 100644 --- a/spec/models/container_repository_spec.rb +++ b/spec/models/container_repository_spec.rb @@ -19,7 +19,7 @@ describe ContainerRepository do .with(headers: { 'Accept' => ContainerRegistry::Client::ACCEPTED_TYPES.join(', ') }) .to_return( status: 200, - body: JSON.dump(tags: ['test_tag']), + body: Gitlab::Json.dump(tags: ['test_tag']), headers: { 'Content-Type' => 'application/json' }) end @@ -309,4 +309,14 @@ describe ContainerRepository do it { is_expected.to eq([]) } end end + + describe '.search_by_name' do + let!(:another_repository) do + create(:container_repository, name: 'my_foo_bar', project: project) + end + + subject { described_class.search_by_name('my_image') } + + it { is_expected.to contain_exactly(repository) } + end end |