Skip to content

Commit 7587abc

Browse files
committed
split
1 parent 14ad9e8 commit 7587abc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

coderd/notifications/notifications_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"path/filepath"
1818
"slices"
1919
"sort"
20+
"strings"
2021
"sync"
2122
"sync/atomic"
2223
"testing"
@@ -884,8 +885,9 @@ func TestNotificationTemplatesCanRender(t *testing.T) {
884885
require.NoError(t, err, "failed to render notification body template")
885886
require.NotEmpty(t, body, "body should not be empty")
886887

887-
bodyGoldenFile := filepath.Join("testdata", "rendered-templates", t.Name()+"-body.md.golden")
888-
titleGoldenFile := filepath.Join("testdata", "rendered-templates", t.Name()+"-title.md.golden")
888+
partialName := strings.Split(t.Name(), "/")[1]
889+
bodyGoldenFile := filepath.Join("testdata", "rendered-templates", partialName+"-body.md.golden")
890+
titleGoldenFile := filepath.Join("testdata", "rendered-templates", partialName+"-title.md.golden")
889891

890892
if *updateGoldenFiles {
891893
err = os.MkdirAll(filepath.Dir(bodyGoldenFile), 0o755)

0 commit comments

Comments
 (0)