mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 03:06:10 +01:00
22 lines
606 B
Go
22 lines
606 B
Go
|
// 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="`)
|
||
|
}
|