diff --git a/web/__snapshots__/web.snapshot b/web/__snapshots__/web.snapshot
index ab97f9b8..a7aed6fd 100644
--- a/web/__snapshots__/web.snapshot
+++ b/web/__snapshots__/web.snapshot
@@ -23,6 +23,15 @@ Location: /foobar/
Moved Permanently.
+/* snapshot: Test_createRoutes_username_password */
+HTTP/1.1 307 Temporary Redirect
+Connection: close
+Content-Security-Policy: default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; manifest-src 'self'; connect-src 'self' api.github.com; require-trusted-types-for 'script'
+Content-Type: text/html; charset=utf-8
+Location: /login
+
+Temporary Redirect.
+
/* snapshot: Test_createRoutes_version */
HTTP/1.1 200 OK
Connection: close
diff --git a/web/routes_test.go b/web/routes_test.go
index fd30b493..60052b86 100644
--- a/web/routes_test.go
+++ b/web/routes_test.go
@@ -302,6 +302,16 @@ func Test_createRoutes_version(t *testing.T) {
abide.AssertHTTPResponse(t, t.Name(), rr.Result())
}
+func Test_createRoutes_username_password(t *testing.T) {
+
+ handler := createHandler(nil, nil, Config{Base: "/", Username: "amir", Password: "password", Key: "key"})
+ req, err := http.NewRequest("GET", "/", nil)
+ require.NoError(t, err, "NewRequest should not return an error.")
+ rr := httptest.NewRecorder()
+ handler.ServeHTTP(rr, req)
+ abide.AssertHTTPResponse(t, t.Name(), rr.Result())
+}
+
func createHandler(client docker.Client, content fs.FS, config Config) *mux.Router {
if client == nil {
client = new(MockedClient)