Skip to content

Commit

Permalink
Add test for non-existing file when downloading github contents
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Jul 23, 2020
1 parent 116723b commit fa11b24
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/github/contents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ func TestDownloadContents(t *testing.T) {
assert.NotEmpty(contents)
assert.Equal(string(readme), string(contents))
}

contents, err = gh.DownloadContents(context.Background(), "philips-labs", "tabia", "IamNotThere.txt")
if assert.Error(err) {
assert.EqualError(err, "No file named IamNotThere.txt found in .")
}
}

0 comments on commit fa11b24

Please sign in to comment.