-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding an S3File factory to clean up tests (#977)
Co-authored-by: Bess Sadler <bess.sadler@princeton.edu>
- Loading branch information
1 parent
ca29a4a
commit 03da34c
Showing
2 changed files
with
23 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :s3_file, class: "S3File" do | ||
filename { "anyfile.txt" } | ||
last_modified { Time.zone.now } | ||
size { 10_759 } | ||
checksum { "abc123" } | ||
query_service { nil } | ||
initialize_with do | ||
new(filename: filename, last_modified: last_modified, size: size, | ||
checksum: checksum, query_service: query_service) | ||
end | ||
end | ||
end |