-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added virtual URL style support and working tests.
- Loading branch information
1 parent
6a6cd41
commit bdcfcd3
Showing
14 changed files
with
724 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ modules/** | |
|
||
# log files | ||
logs/** | ||
.idea/ |
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
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,52 @@ | ||
/** | ||
* My BDD Test | ||
*/ | ||
component extends="coldbox.system.testing.BaseTestCase"{ | ||
|
||
/*********************************** LIFE CYCLE Methods ***********************************/ | ||
this.unloadColdbox=false; | ||
// executes before all suites+specs in the run() method | ||
function beforeAll(){ | ||
super.beforeAll(); | ||
} | ||
|
||
// executes after all suites+specs in the run() method | ||
//function afterAll(){ | ||
|
||
//} | ||
|
||
/*********************************** BDD SUITES ***********************************/ | ||
|
||
function run( testResults, testBox ){ | ||
// all your suites go here. | ||
describe( "The buildKeyName function should...", function(){ | ||
beforeEach(function(){ | ||
uri = mockData($num=1,$type="words:1")[1]; | ||
bucketName = mockData($num=1,$type="words:1")[1]; | ||
|
||
testObj = getInstance("AmazonS3@s3sdk"); | ||
}); | ||
it( "If the urlStyle is path and a bucket is submitted, return bucket\uri", function(){ | ||
testObj.setUrlStyle("path"); | ||
testme = testObj.buildKeyName(uri,bucketName); | ||
expect(testme).tobe("#bucketName#/#uri#"); | ||
}); | ||
it( "If the urlStyle is path and a bucket is not submitted, return uri", function(){ | ||
testObj.setUrlStyle("path"); | ||
testme = testObj.buildKeyName(uri); | ||
expect(testme).tobe(uri); | ||
}); | ||
it( "If the urlStyle is path and the bucket is an empty string, return uri", function(){ | ||
testObj.setUrlStyle("path"); | ||
testme = testObj.buildKeyName(uri,""); | ||
expect(testme).tobe(uri); | ||
}); | ||
it( "If the urlStyle is virtual, return uri", function(){ | ||
testObj.setUrlStyle("virtual"); | ||
testme = testObj.buildKeyName(uri,bucketname); | ||
expect(testme).tobe(uri); | ||
}); | ||
}); | ||
} | ||
} | ||
|
Oops, something went wrong.