@@ -91,7 +91,7 @@ func TestCreateHook(t *testing.T) {
9191
9292 contentBytes , err := os .ReadFile (fmt .Sprintf ("%s/commit-msg" , hookPath ))
9393 assert .Nil (t , err )
94- assert .Contains (t , string (contentBytes ), "root/commit-message-check validate" )
94+ assert .Contains (t , string (contentBytes ), ` "root/commit-message-check" validate` )
9595 })
9696
9797 t .Run ("returns any error" , func (t * testing.T ) {
@@ -134,15 +134,15 @@ func TestWriteContent(t *testing.T) {
134134
135135 writeContent (buffer , "usr/tmp" )
136136
137- assert .Contains (t , buffer .String (), " #!/bin/sh\n \n " )
137+ assert .Contains (t , buffer .String (), ` #!/bin/sh\n\n` )
138138 })
139139
140- t .Run ("executes commit-message-check with root path" , func (t * testing.T ) {
140+ t .Run ("executes commit-message-check with root path and quotes path to handle spaces " , func (t * testing.T ) {
141141 buffer .Reset ()
142142
143143 writeContent (buffer , "usr/tmp" )
144144
145- assert .Contains (t , buffer .String (), "usr/tmp/commit-message-check validate $1\n " )
145+ assert .Contains (t , buffer .String (), ` "usr/tmp/commit-message-check" validate $1\n` )
146146 })
147147
148148 t .Run ("logs any error" , func (t * testing.T ) {
0 commit comments