Use long and short gh param value for color scheme and pattern

This commit is contained in:
2023-02-05 17:51:21 +01:00
parent 18a1c2276b
commit 6f3912a543
2 changed files with 16 additions and 2 deletions

View File

@ -85,6 +85,20 @@ func TestCorrectResponseForGHColorSchemeAndPattern(t *testing.T) {
}
}
func TestCorrectResponseForAltGHColorSchemeAndPattern(t *testing.T) {
req, err := http.NewRequest("GET", "/avatar/1a79a4d60de6718e8e5b326e338ae533?c=github&d=gh", nil)
if err != nil {
t.Fatal(err)
}
rr := httptest.NewRecorder()
testRouter().ServeHTTP(rr, req)
if !reflect.DeepEqual(rr.Body.Bytes(), gh1) {
t.Errorf("returned image does not match expected image")
}
}
func TestUsesConfig(t *testing.T) {
configure("./testdata/testconfig.toml")