mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-30 23:53:52 +03:00
26 lines
598 B
Go
26 lines
598 B
Go
|
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package integration
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
"testing"
|
||
|
|
||
|
"code.gitea.io/gitea/tests"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestViewPulls(t *testing.T) {
|
||
|
defer tests.PrepareTestEnv(t)()
|
||
|
|
||
|
req := NewRequest(t, "GET", "/user2/repo1/pulls")
|
||
|
resp := MakeRequest(t, req, http.StatusOK)
|
||
|
|
||
|
htmlDoc := NewHTMLParser(t, resp.Body)
|
||
|
search := htmlDoc.doc.Find(".list-header-search > .search > .input > input")
|
||
|
placeholder, _ := search.Attr("placeholder")
|
||
|
assert.Equal(t, "Search pulls...", placeholder)
|
||
|
}
|