Debian Codegraph @

helper/temporal/temporal_test.go

raw symbols SCIP
1 package temporal
2
3 import (
4 "strings"
5 "testing"
6
7 "github.com/go-git/go-billy/v6/memfs"
8 "github.com/stretchr/testify/assert"
9 "github.com/stretchr/testify/require"
10 )
11
12 func TestTempFileDefaultPath(t *testing.T) {
13 fs := New(memfs.New(), "foo")
14 f, err := fs.TempFile("", "bar")
15
16 require.NoError(t, err)
17 require.NoError(t, f.Close())
18
19 assert.True(t, strings.HasPrefix(f.Name(), fs.Join("foo", "bar")))
20 }