diff options
Diffstat (limited to 'spec/frontend/packages_and_registries/dependency_proxy/app_spec.js')
-rw-r--r-- | spec/frontend/packages_and_registries/dependency_proxy/app_spec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js b/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js index f2901148e17..fb50d623543 100644 --- a/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js +++ b/spec/frontend/packages_and_registries/dependency_proxy/app_spec.js @@ -50,6 +50,7 @@ describe('DependencyProxyApp', () => { groupPath: 'gitlab-org', groupId: dummyGrouptId, noManifestsIllustration: 'noManifestsIllustration', + canClearCache: true, }; function createComponent({ provide = provideDefaults } = {}) { @@ -268,6 +269,23 @@ describe('DependencyProxyApp', () => { 'All items in the cache are scheduled for removal.', ); }); + + describe('when user has no permission to clear cache', () => { + beforeEach(() => { + createComponent({ + provide: { + groupPath: 'gitlab-org', + groupId: dummyGrouptId, + noManifestsIllustration: 'noManifestsIllustration', + canClearCache: false, + }, + }); + }); + + it('does not show the clear cache dropdown list', () => { + expect(findClearCacheDropdownList().exists()).toBe(false); + }); + }); }); }); }); |