package docs

import (
	"testing"

	"github.com/swaggo/swag"
)

func TestInitRegistersSwaggerSpec(t *testing.T) {
	registered := swag.GetSwagger(SwaggerInfo.InstanceName())
	if registered == nil {
		t.Fatalf("swagger spec %q was not registered", SwaggerInfo.InstanceName())
	}
	if registered.ReadDoc() == "" {
		t.Fatalf("registered swagger doc is empty")
	}
}
