Skip to content

Commit

Permalink
test(server/server_test.go): ignore analytics template variable for test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewhrit committed Jul 13, 2024
1 parent 0cc830b commit dcf58c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package server_test
import (
"net/http"
"os"
"strings"
"testing"

"github.com/lukewhrit/spacebin/internal/database"
Expand Down Expand Up @@ -80,7 +81,9 @@ func TestMountStatic(t *testing.T) {

indexFile, _ := os.ReadFile("./web/index.html")

require.Equal(t, string(indexFile), indexResponse.Body.String())
indexString := strings.Replace(string(indexFile), "{{.Analytics}}", "", -1)

require.Equal(t, indexString, indexResponse.Body.String())
}

func TestRegisterHeaders(t *testing.T) {
Expand Down

0 comments on commit dcf58c3

Please sign in to comment.