1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/tests/integration/mention_test.go

22 lines
606 B
Go
Raw Normal View History

// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: GPL-3.0-or-later
package integration
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestHeadMentionCSS(t *testing.T) {
userSession := loginUser(t, "user2")
resp := userSession.MakeRequest(t, NewRequest(t, "GET", "/"), http.StatusOK)
assert.Contains(t, resp.Body.String(), `.mention[href="/user2" i]`)
guestSession := emptyTestSession(t)
resp = guestSession.MakeRequest(t, NewRequest(t, "GET", "/"), http.StatusOK)
assert.NotContains(t, resp.Body.String(), `.mention[href="`)
}