mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-09 17:38:04 +02:00
Refactor server code (#407)
This commit is contained in:
22
internal/web/test/settings_test.go
Normal file
22
internal/web/test/settings_test.go
Normal file
@ -0,0 +1,22 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/thomiceli/opengist/internal/db"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSettingsPage(t *testing.T) {
|
||||
s := Setup(t)
|
||||
defer Teardown(t, s)
|
||||
|
||||
err := s.Request("GET", "/settings", nil, 302)
|
||||
require.NoError(t, err)
|
||||
|
||||
user1 := db.UserDTO{Username: "thomas", Password: "thomas"}
|
||||
register(t, s, user1)
|
||||
login(t, s, user1)
|
||||
|
||||
err = s.Request("GET", "/settings", nil, 200)
|
||||
require.NoError(t, err)
|
||||
}
|
Reference in New Issue
Block a user