Created
October 17, 2016 20:01
-
-
Save csmith0651/097f4e4e5773a7f5e4193049d7585987 to your computer and use it in GitHub Desktop.
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
var svc S3Fetcher.S3Fetcher | |
var err error | |
var jsonData string = goodJson | |
JustBeforeEach(func() { | |
svc, err = S3Fetcher.NewStringFetcher(jsonData) | |
}) | |
Context("ReadPersonFromS3", func() { | |
It("successfully reads data from S3", func() { | |
Expect(ReadPersonFromS3(svc)).To(HaveLen(2)) | |
}) | |
Context("fails to read data from S3", func() { | |
BeforeEach(func() { | |
jsonData = "" | |
}) | |
It("because of JSON format error", func() { | |
_, err := ReadPersonFromS3(svc) | |
Expect(err).To(HaveOccurred()) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment