diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 21:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 21:09:10 +0300 |
commit | 6d5a18ac65db79f3a32fb06618a4c4b7a08e777b (patch) | |
tree | 08fa8a2fdcf6bd23ae3a19fce008dcc38629ef2d /spec/frontend/registry | |
parent | 5fc3c77e2b08746bd39bfffae0c5918d63178433 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/registry')
-rw-r--r-- | spec/frontend/registry/explorer/utils_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/registry/explorer/utils_spec.js b/spec/frontend/registry/explorer/utils_spec.js index d26cf3e56da..365bfc9ea19 100644 --- a/spec/frontend/registry/explorer/utils_spec.js +++ b/spec/frontend/registry/explorer/utils_spec.js @@ -15,5 +15,17 @@ describe('Utils', () => { it('returns the url with an ending when is passed', () => { expect(pathGenerator(imageDetails, '/foo')).toBe('/foo/bar/registry/repository/1/tags/foo'); }); + + it('returns the url unchanged when imageDetails have no name', () => { + const imageDetailsWithoutName = { + path: 'foo/bar/baz', + name: '', + id: 1, + }; + + expect(pathGenerator(imageDetailsWithoutName)).toBe( + '/foo/bar/baz/registry/repository/1/tags?format=json', + ); + }); }); }); |