You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
588 B
26 lines
588 B
7 years ago
|
// Copyright 2017 The Gitea Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
2 years ago
|
package integration
|
||
7 years ago
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
"testing"
|
||
2 years ago
|
|
||
|
"code.gitea.io/gitea/tests"
|
||
7 years ago
|
)
|
||
|
|
||
|
func TestSignOut(t *testing.T) {
|
||
2 years ago
|
defer tests.PrepareTestEnv(t)()
|
||
7 years ago
|
|
||
|
session := loginUser(t, "user2")
|
||
|
|
||
5 years ago
|
req := NewRequest(t, "POST", "/user/logout")
|
||
3 years ago
|
session.MakeRequest(t, req, http.StatusSeeOther)
|
||
7 years ago
|
|
||
|
// try to view a private repo, should fail
|
||
3 years ago
|
req = NewRequest(t, "GET", "/user2/repo2")
|
||
7 years ago
|
session.MakeRequest(t, req, http.StatusNotFound)
|
||
|
}
|