Skip to content

Commit

Permalink
fix(tests): unit test failed post latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
burgesQ committed Dec 6, 2023
1 parent db298d1 commit bff4094
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion handler/redoc/redoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ const (
</style>
</head>
<body>
<redoc spec-url={{ .DocURI }}></redoc>
<redoc spec-url={{ .DocURI }}
required-props-first=true
theme='{
"sidebar": {
"backgroundColor": "lightblue"
}
}'
></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
</body>
</html>`
Expand Down
2 changes: 1 addition & 1 deletion handler/redoc/redoc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestRedocParam(t *testing.T) {

assert.Equal(t, _defPath, def.Path)
assert.Contains(t, string(genContent(defRedoc())),
"<redoc spec-url="+_defURI+"></redoc>")
"<redoc spec-url="+_defURI+"\n")
}

func TestGetHandler(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion handler/slogging/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import (
const _testPort = ":6670"

func TestHandler(t *testing.T) {
// TODO: use a mocked logger to ensure debug / info has been used

s, e := webfmwk.InitServer(webfmwk.CheckIsUp(),
webfmwk.SetPrefix("/api"),
webfmwk.WithHandlers(Handler),
webfmwk.WithHandlers(NewHandler()),
)

require.Nil(t, e)
Expand Down

0 comments on commit bff4094

Please sign in to comment.