-
Notifications
You must be signed in to change notification settings - Fork 2
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 #22 from online-photo-submission/customFilePath
Added ability to specify a custom file path
- Loading branch information
Showing
3 changed files
with
10 additions
and
2 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
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 |
---|---|---|
|
@@ -27,6 +27,7 @@ class CSVManifestFileServiceSpec extends Specification { | |
"PhotoLink": "bytes", | ||
"DateSubmitted": "dateSubmitted" | ||
] | ||
csvManifestFileService.customFilePath = "//random/nonsense/" | ||
} | ||
|
||
def "test createManifestFile generates file with correct content"() { | ||
|
@@ -76,6 +77,7 @@ class CSVManifestFileServiceSpec extends Specification { | |
"date property" | "dateCreated" | new Photo(id: 1, person: new Person(identifier: "123", email: "[email protected]"), bytes: null, dateCreated: parseDate("Fri Feb 16 11:41:44 EST 2024")) | null | "2024-02-16" | ||
"custom Field property" | "person.customFields.Full Name" | new Photo(id: 1, person: new Person(identifier: "123", email: "[email protected]", customFields: ["Full Name": "James"]), bytes: null) | null | "James" | ||
"photo full file path" | "photo_fullFilePath" | new Photo(id: 1, person: new Person(identifier: "123", email: "[email protected]"), bytes: null) | new PhotoFile("photo1", "/Users/Calvin/downloaded-photos/photo1.jpg", 1) | "/Users/Calvin/downloaded-photos/photo1.jpg" | ||
"photo custom path" | "photo_customFilePath" | new Photo(id: 1, person: new Person(identifier: "123", email: "[email protected]"), bytes: null) | new PhotoFile("photo2", "photo2.jpg", 1) | "//random/nonsense/photo2.jpg" | ||
"photo file name" | "photo_fileName" | new Photo(id: 1, person: new Person(identifier: "123", email: "[email protected]"), bytes: null) | new PhotoFile("photo2", "photo2.jpg", 1) | "photo2.jpg" | ||
} | ||
|
||
|
@@ -133,4 +135,4 @@ class CSVManifestFileServiceSpec extends Specification { | |
private static Date parseDate(String dateString) { | ||
new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy").parse(dateString) | ||
} | ||
} | ||
} |