File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,28 @@ describe('header utils', () => {
145145 const items = renderHook ( ( ) => useLibrarySettingsMenuItems ( 'library-123' , false ) ) . result . current ;
146146 expect ( items ) . toContainEqual ( { title : 'Team Access' , href : 'http://localhost/?sa=manage-team' } ) ;
147147 } ) ;
148+ it ( 'should contain admin console url if set' , ( ) => {
149+ setConfig ( {
150+ ...getConfig ( ) ,
151+ ADMIN_CONSOLE_URL : 'http://admin-console.com' ,
152+ } ) ;
153+ const items = renderHook ( ( ) => useLibrarySettingsMenuItems ( 'library-123' , false ) ) . result . current ;
154+ expect ( items ) . toContainEqual ( {
155+ title : 'Team Access' ,
156+ href : 'http://admin-console.com/authz/libraries/library-123' ,
157+ } ) ;
158+ } ) ;
159+ it ( 'should contain admin console url if set and readOnly is true' , ( ) => {
160+ setConfig ( {
161+ ...getConfig ( ) ,
162+ ADMIN_CONSOLE_URL : 'http://admin-console.com' ,
163+ } ) ;
164+ const items = renderHook ( ( ) => useLibrarySettingsMenuItems ( 'library-123' , true ) ) . result . current ;
165+ expect ( items ) . toContainEqual ( {
166+ title : 'Team Access' ,
167+ href : 'http://admin-console.com/authz/libraries/library-123' ,
168+ } ) ;
169+ } ) ;
148170 } ) ;
149171
150172 describe ( 'useLibraryToolsMenuItems' , ( ) => {
You can’t perform that action at this time.
0 commit comments