16106: Merge branch 'master' into 16106-azure-spot-instance-support
[arvados.git] / lib / controller / localdb / login_testuser_test.go
index d2d651e205ca5b668d80ef838f74f5dc0ce9bc03..7589088899744efca9187e2cc9d3094b8d39db03 100644 (file)
@@ -92,3 +92,12 @@ func (s *TestUserSuite) TestLogin(c *check.C) {
                }
        }
 }
+
+func (s *TestUserSuite) TestLoginForm(c *check.C) {
+       resp, err := s.ctrl.Login(s.ctx, arvados.LoginOptions{
+               ReturnTo: "https://localhost:12345/example",
+       })
+       c.Check(err, check.IsNil)
+       c.Check(resp.HTML.String(), check.Matches, `(?ms).*<form method="POST".*`)
+       c.Check(resp.HTML.String(), check.Matches, `(?ms).*<input id="return_to" type="hidden" name="return_to" value="https://localhost:12345/example">.*`)
+}