aboutsummaryrefslogtreecommitdiff
path: root/internal/lume/lume_test.go
blob: 49cd30960f93a5ae010f52318db38556489b0070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package lume

import (
	"context"
	"os"
	"testing"
)

func TestCanBuildSite(t *testing.T) {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	dir, err := os.MkdirTemp("", "xesite")
	if err != nil {
		t.Fatal(err)
	}

	if _, err := New(ctx, &Options{
		Branch:        "main",
		Repo:          "https://github.com/Xe/site",
		StaticSiteDir: "lume",
		URL:           "https://devel.xeiaso.net/",
		DataDir:       dir,
	}); err != nil {
		t.Fatal(err)
	}
}