Documentation
¶
Index ¶
- func CreateTempProject(t *testing.T) (dir string, cleanup func())
- func CreateTestDir(t *testing.T, path string)
- func DirExists(path string) bool
- func FileExists(path string) bool
- func NewTestServer(t *testing.T, responses map[string]TestResponse) *httptest.Server
- func NewTestServerWithHandler(handler http.HandlerFunc) *httptest.Server
- func ReadTestFile(t *testing.T, path string) string
- func TestArticle() *api.Article
- func TestContentBlock() *api.ContentBlock
- func TestProduct() *api.Product
- func TestTheme() *api.Theme
- func TestThemeMinimal() *api.Theme
- func WriteTestFile(t *testing.T, path, content string)
- type TestResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempProject ¶
CreateTempProject creates a temporary project structure for testing
func CreateTestDir ¶
CreateTestDir creates a test directory
func NewTestServer ¶
NewTestServer creates a test HTTP server with predefined responses
func NewTestServerWithHandler ¶
func NewTestServerWithHandler(handler http.HandlerFunc) *httptest.Server
NewTestServerWithHandler creates a test server with custom handler
func ReadTestFile ¶
ReadTestFile reads content from a test file
func TestContentBlock ¶
func TestContentBlock() *api.ContentBlock
TestContentBlock returns a sample content block for testing
func TestThemeMinimal ¶
TestThemeMinimal returns a minimal theme for testing Note: Variables and Assets are explicitly nil (not just omitted)
func WriteTestFile ¶
WriteTestFile writes content to a test file
Types ¶
type TestResponse ¶
TestResponse defines a mock HTTP response
Click to show internal directories.
Click to hide internal directories.