1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
diff --git a/gomodinit_test.go b/gomodinit_test.go
index c62464d70c67a202a08333d6c858ffd237710c87..fda1be3aed58c932cf95451f23def0598e9aa86d 100644
--- a/gomodinit_test.go
+++ b/gomodinit_test.go
@@ -4,7 +4,6 @@ import (
"fmt"
"os"
"path/filepath"
- "strings"
"testing"
"github.com/matryer/is"
@@ -32,7 +31,7 @@ },
{
Name: "no_uri",
Path: "giteacom/user3/repo",
- Expected: "%s/giteacom/user3/repo",
+ Expected: fmt.Sprintf("%s/giteacom/user3/repo", tmp),
},
{
Name: ".gomodinit",
@@ -65,12 +64,7 @@
name, err := module()
assert.NoErr(err) // Should get module name
- expected := tc.Expected
- if strings.Contains(expected, "%s") {
- expected = fmt.Sprintf(expected, tmp)
- }
-
- assert.Equal(name, expected) // Module name should match expected name
+ assert.Equal(name, tc.Expected) // Module name should match expected name
})
}
}
|