Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed May 21, 2024
1 parent ce5299e commit 74731a4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .cfconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"class":"${DB_CLASS}",
"dbdriver": "MySQL",
"dsn":"jdbc:mysql://{host}:{port}/{database}",
"custom":"useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC&useLegacyDatetimeCode=true&autoReconnect=true&useSSL=false",
"custom":"useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC&useLegacyDatetimeCode=true&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true",
"host":"${DB_HOST:127.0.0.1}",
"username": "${DB_USER}",
"password": "${DB_PASSWORD}",
Expand Down
12 changes: 6 additions & 6 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"JVM":{
"heapSize":"1024"
},
"cfconfig": {
"file" : ".cfconfig.json"
},
"scripts" : {
"onServerInstall":"cfpm install caching,zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger"
}
"cfconfig":{
"file":".cfconfig.json"
},
"scripts":{
"onServerInstall":"cfpm install caching,zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger"
}
}
14 changes: 7 additions & 7 deletions system/core/util/CFMLEngine.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ component {
/**
* Returns the current running CFML major version level
*/
numeric function getVersion(){
return listFirst( getFullVersion(), "." );
function getVersion(){
return listFirst( getFullVersion(), "," );
}

/**
* Returns the current running CFML full version
*/
string function getFullVersion(){
function getFullVersion(){
switch ( getEngine() ) {
case this.adobe:
case "adobe":
return server.coldfusion.productVersion;
case this.lucee:
case "lucee":
return server.lucee.version;
case this.boxlang:
case "boxlang":
return server.boxlang.version;
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ component {
/**
* Discover the running engine slug for feature checks
*
* @return lucee, adobe{version}
* @return lucee, adobe{version}, boxlang
*/
string function getFeatureEngineSlug(){
var engine = getEngine();
Expand Down
4 changes: 2 additions & 2 deletions tests/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
</p>
<cfset runners = directoryList( expandPath( "./" ), false, "query", "runner*.cfm" )>
<cfoutput query="runners">
<cfloop query="runners">
<a href="#runners.name#" target="_blank" class="btn btn-secondary btn-sm my-1 mx-1">#runners.name#</a>
</cfoutput>
</cfloop>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions tests/specs/core/util/CFMLEngineTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
}

function testGetVersion(){
expect( target.getVersion() ).toBeNumeric();
expect( target.getVersion() ).toBeNumeric( target.getVersion() );
}

function testGetFullVersion(){
expect( target.getFullVersion() ).toBeString();
expect( target.getFullVersion() ).toBeString( target.getFullVersion() );
}

function testGetEngine(){
expect( target.getEngine() ).toBeString();
expect( target.getEngine() ).toBeString( target.getEngine() );
}

}

0 comments on commit 74731a4

Please sign in to comment.