Working download photo method

Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
Kris Nóva 2021-02-09 18:25:46 -08:00
parent c1a45bf8e3
commit b7fd487a2e
18 changed files with 918 additions and 170 deletions

View file

@ -57,3 +57,21 @@ func TestSadUpdatePhoto(t *testing.T) {
t.Errorf("expecting failure updaitng bad photo id: %s", photo.UUID)
t.FailNow()
}
func TestHappyGetPhotoDownload(t *testing.T) {
_, err := Client.V1().GetPhotoDownload(WellKnownPhotoID)
if err != nil {
t.Errorf("expected success getting well known photo: %v", err)
t.FailNow()
}
}
func TestSadGetPhotoDownload(t *testing.T) {
file, err := Client.V1().GetPhotoDownload("1234567890")
if err != nil {
t.Logf("success returning error for unknown photo: %v", err)
return
}
t.Errorf("expected error for unknown file: %s", file.FileName)
t.FailNow()
}