Created
June 3, 2019 06:52
tighter mock
This file contains hidden or 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
(deftest get-file-metadata-test | |
(let [example-bucket "some-bucket" | |
example-filename "some-file" | |
example-metadata {:example "valid metadata"}] | |
(testing "should return file metadata in case file exists" | |
(with-redefs [s3/get-object (fn [& {:keys [bucket-name key]}] | |
(when (and | |
(= bucket-name example-bucket) | |
(= key example-filename)) | |
example-metadata))] | |
(is (= example-metadata (get-file-metadata example-bucket example-filename))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment