-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2252 from zspitzer/test-cleanup-29-sept-2023
cleanup and enable passing tests
- Loading branch information
Showing
60 changed files
with
300 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<cfcomponent extends="org.lucee.cfml.test.LuceeTestCase" labels="pdf"> | ||
<cfscript> | ||
function run( testResults , testBox ) { | ||
describe( "Test suite for LDEV-499", function() { | ||
it("Checking CFdocument with encryption, without attribute userpassword", function( currentSpec ) { | ||
var result = CFdocumentWithoutAttribute(); | ||
// expect(result).toBeTypeOf('Struct'); | ||
expect(result.Encryption).toBe('No Security'); | ||
}); | ||
|
||
it("Checking CFdocument with encryption, with attribute userpassword='' while creating pdf", function( currentSpec ) { | ||
var result = CFdocumentWithEncryption(); | ||
expect(result.Encryption).toBe('No Security'); | ||
}); | ||
|
||
it("Checking CFdocument with encryption, with attribute password='' while reading pdf", function( currentSpec ) { | ||
var result = CFdocumentWitheEmptyValueUserPassword(); | ||
expect(result.Encryption).toBe('No Security'); | ||
}); | ||
|
||
it("Checking CFdocument with encryption, with password", function( currentSpec ) { | ||
var result = CFdocumentWithPassword(); | ||
expect(result.Encryption).toBe('Password Security'); | ||
}); | ||
|
||
}); | ||
} | ||
// private function// | ||
private string function createURI(string calledName){ | ||
var baseURI="/test/#listLast(getDirectoryFromPath(getCurrenttemplatepath()),"\/")#/"; | ||
return baseURI&""&calledName; | ||
} | ||
</cfscript> | ||
|
||
<cffunction name="CFdocumentWithoutAttribute" access="private" returntype="Struct"> | ||
<cfset var testPDF=getTempFile(getTempDirectory(), "LDEV0499", "pdf")> | ||
<cfdocument format="PDF" overwrite="true" encryption="40-bit" filename="#testPDF#"> | ||
<cfdocumentsection> | ||
Lucee test documents | ||
</cfdocumentsection> | ||
</cfdocument> | ||
<cfpdf action="read" name="pdfDetails" source="#testPDF#"/> | ||
<cfreturn pdfDetails> | ||
</cffunction> | ||
|
||
<cffunction name="CFdocumentWithEncryption" access="private" returntype="Struct"> | ||
<cfset var testPDF=getTempFile(getTempDirectory(), "LDEV0499", "pdf")> | ||
<cfdocument format="PDF" overwrite="true" userpassword="" encryption="40-bit" filename="#testPDF#"> | ||
<cfdocumentsection> | ||
Lucee test documents | ||
</cfdocumentsection> | ||
</cfdocument> | ||
<cfpdf action="read" name="pdfDetails" source="#testPDF#"/> | ||
<cfreturn pdfDetails> | ||
</cffunction> | ||
|
||
<cffunction name="CFdocumentWitheEmptyValueUserPassword" access="private" returntype="Struct"> | ||
<cfset var testPDF=getTempFile(getTempDirectory(), "LDEV0499", "pdf")> | ||
<cfdocument format="PDF" overwrite="true" encryption="40-bit" filename="#testPDF#"> | ||
<cfdocumentsection> | ||
Lucee test documents | ||
</cfdocumentsection> | ||
</cfdocument> | ||
<cfpdf action="read" name="pdfDetails" source="#testPDF#" password=""/> | ||
<cfreturn pdfDetails> | ||
</cffunction> | ||
|
||
<cffunction name="CFdocumentWithPassword" access="private" returntype="Struct"> | ||
<cfset var testPDF=getTempFile(getTempDirectory(), "LDEV0499", "pdf")> | ||
<cfdocument format="PDF" overwrite="true" encryption="40-bit" filename="#testPDF#" userpassword="Lucee"> | ||
<cfdocumentsection> | ||
Lucee test documents | ||
</cfdocumentsection> | ||
</cfdocument> | ||
<cfpdf action="read" name="pdfDetails" source="#testPDF#" password="Lucee"/> | ||
<cfreturn pdfDetails> | ||
</cffunction> | ||
</cfcomponent> |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.