docs: improve docs coverage
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
d930adbd49
commit
2d9c1f52ea
@ -733,6 +733,10 @@ var SwaggerInfo = swaggerInfo{Schemes: []string{}}
|
|||||||
|
|
||||||
type s struct{}
|
type s struct{}
|
||||||
|
|
||||||
|
func New() *s {
|
||||||
|
return &s{}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *s) ReadDoc() string {
|
func (s *s) ReadDoc() string {
|
||||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||||
"marshal": func(v interface{}) string {
|
"marshal": func(v interface{}) string {
|
||||||
|
15
docs/docs_test.go
Normal file
15
docs/docs_test.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package docs_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/anuvu/zot/docs"
|
||||||
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestDocs(t *testing.T) {
|
||||||
|
Convey("Read docs", t, func() {
|
||||||
|
s := docs.New()
|
||||||
|
So(s.ReadDoc(), ShouldNotBeEmpty)
|
||||||
|
})
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user