Skip to content

Commit 2636b09

Browse files
committed
seems like the formatting rules that caused the length function
defintiion to have line breaks is what causes the line by line coverage rate to drop below the threshold. added new router test for /gotifyinfo to rectify that.
1 parent 24070e0 commit 2636b09

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎router/router_test.go‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ func (s *IntegrationSuite) BeforeTest(string, string) {
4242
g, closable := Create(
4343
s.db.GormDatabase,
4444
&model.VersionInfo{Version: "1.0.0", BuildDate: "2018-02-20-17:30:47", Commit: "asdasds"},
45-
&config.Configuration{PassStrength: 5, LocalAuthEnabled: true},
45+
&config.Configuration{
46+
PassStrength: 5,
47+
LocalAuthEnabled: true,
48+
OIDC: config.OIDC{IDPName: "Company XYZ SSO"},
49+
},
4650
)
4751
s.closable = closable
4852
s.server = httptest.NewServer(g)
@@ -60,6 +64,12 @@ func (s *IntegrationSuite) TestVersionInfo() {
6064
doRequestAndExpect(s.T(), req, 200, `{"version":"1.0.0", "commit":"asdasds", "buildDate":"2018-02-20-17:30:47"}`)
6165
}
6266

67+
func (s *IntegrationSuite) TestGotifyInfo() {
68+
req := s.newRequest("GET", "gotifyinfo", "")
69+
70+
doRequestAndExpect(s.T(), req, 200, `{"version":"1.0.0", "oidc":false, "register":false, "localAuth":true, "oidcIdpName":"Company XYZ SSO"}`)
71+
}
72+
6373
func (s *IntegrationSuite) TestHeaderInProd() {
6474
mode.Set(mode.Prod)
6575
req := s.newRequest("GET", "version", "")

0 commit comments

Comments
 (0)