aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/wiki_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/wiki_test.go')
-rw-r--r--tests/integration/wiki_test.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/integration/wiki_test.go b/tests/integration/wiki_test.go
index bb73f71a45..ac458af378 100644
--- a/tests/integration/wiki_test.go
+++ b/tests/integration/wiki_test.go
@@ -4,8 +4,6 @@
package integration
import (
- "context"
- "fmt"
"net/http"
"net/url"
"os"
@@ -30,7 +28,7 @@ func assertFileExist(t *testing.T, p string) {
func assertFileEqual(t *testing.T, p string, content []byte) {
bs, err := os.ReadFile(p)
assert.NoError(t, err)
- assert.EqualValues(t, content, bs)
+ assert.Equal(t, content, bs)
}
func TestRepoCloneWiki(t *testing.T) {
@@ -39,11 +37,11 @@ func TestRepoCloneWiki(t *testing.T) {
dstPath := t.TempDir()
- r := fmt.Sprintf("%suser2/repo1.wiki.git", u.String())
+ r := u.String() + "user2/repo1.wiki.git"
u, _ = url.Parse(r)
u.User = url.UserPassword("user2", userPassword)
t.Run("Clone", func(t *testing.T) {
- assert.NoError(t, git.CloneWithArgs(context.Background(), git.AllowLFSFiltersArgs(), u.String(), dstPath, git.CloneRepoOptions{}))
+ assert.NoError(t, git.CloneWithArgs(t.Context(), git.AllowLFSFiltersArgs(), u.String(), dstPath, git.CloneRepoOptions{}))
assertFileEqual(t, filepath.Join(dstPath, "Home.md"), []byte("# Home page\n\nThis is the home page!\n"))
assertFileExist(t, filepath.Join(dstPath, "Page-With-Image.md"))
assertFileExist(t, filepath.Join(dstPath, "Page-With-Spaced-Name.md"))
@@ -70,6 +68,6 @@ func Test_RepoWikiPages(t *testing.T) {
href, _ := firstAnchor.Attr("href")
pagePath := strings.TrimPrefix(href, "/user2/repo1/wiki/")
- assert.EqualValues(t, expectedPagePaths[i], pagePath)
+ assert.Equal(t, expectedPagePaths[i], pagePath)
})
}