We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ebf257 commit 5abd1d2Copy full SHA for 5abd1d2
integrations/signout_test.go
@@ -0,0 +1,26 @@
1
+// Copyright 2017 The Gitea Authors. All rights reserved.
2
+// Use of this source code is governed by a MIT-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package integrations
6
7
+import (
8
+ "net/http"
9
+ "testing"
10
+)
11
12
+func TestSignOut(t *testing.T) {
13
+ prepareTestEnv(t)
14
15
+ session := loginUser(t, "user2")
16
17
+ req := NewRequest(t, "GET", "/user/logout")
18
+ session.MakeRequest(t, req, http.StatusFound)
19
20
+ // try to view a private repo, should fail
21
+ req = NewRequest(t, "GET", "/user2/repo2/")
22
+ session.MakeRequest(t, req, http.StatusNotFound)
23
24
+ // invalidate cached cookies for user2, for subsequent tests
25
+ delete(loginSessionCache, "user2")
26
+}
0 commit comments