Skip to content

Commit

Permalink
LDEV-4715 - improve Administrator.cfc test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 2, 2023
1 parent c7981c6 commit 548e555
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/components/Administrator.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -1670,11 +1670,14 @@ component extends="org.lucee.cfml.test.LuceeTestCase"{
});

it(title="checking createSecurityManager()", body=function( currentSpec ) {
var isMulti=getPageContext().getConfig().getAdminMode()==2/*ADMINMODE_MULTI = 2*/;
var contexts=admin.getContexts();
admin.createsecuritymanager(id=contexts.id[1]);
var testContexts=admin.getContexts();
var result = QueryRowData(testContexts, 1);
expect( result.hasOwnSecContext ).toBe( true, result.toJson() );
// only when multi this must be true
if(isMulti) expect( result.hasOwnSecContext ).toBe( true, result.toJson() );
else expect( result.hasOwnSecContext ).toBe( false, result.toJson() );
});

it(title="checking getSecurityManager()", body=function( currentSpec ) {
Expand Down

0 comments on commit 548e555

Please sign in to comment.