File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
17
17
"path/filepath"
18
18
"slices"
19
19
"sort"
20
+ "strings"
20
21
"sync"
21
22
"sync/atomic"
22
23
"testing"
@@ -884,8 +885,9 @@ func TestNotificationTemplatesCanRender(t *testing.T) {
884
885
require .NoError (t , err , "failed to render notification body template" )
885
886
require .NotEmpty (t , body , "body should not be empty" )
886
887
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" )
889
891
890
892
if * updateGoldenFiles {
891
893
err = os .MkdirAll (filepath .Dir (bodyGoldenFile ), 0o755 )
You can’t perform that action at this time.
0 commit comments