aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_nodeinfo_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-09-20 09:59:20 +0200
committerGitHub <noreply@github.com>2022-09-20 15:59:20 +0800
commit1b630ff7cdbb2ec48b67f8e3295c142f5ad77180 (patch)
tree94b691df8f8a5ced3b5cba28f975d360cff89b31 /tests/integration/api_nodeinfo_test.go
parenta196302472d559f04ed9a4387156bedf26b7c55d (diff)
downloadgitea-1b630ff7cdbb2ec48b67f8e3295c142f5ad77180.tar.gz
gitea-1b630ff7cdbb2ec48b67f8e3295c142f5ad77180.zip
Fix user visible check (#21210)
Fixes #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as `count` can never be less then 0. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'tests/integration/api_nodeinfo_test.go')
-rw-r--r--tests/integration/api_nodeinfo_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/integration/api_nodeinfo_test.go b/tests/integration/api_nodeinfo_test.go
index 76f9105a51..2446acec94 100644
--- a/tests/integration/api_nodeinfo_test.go
+++ b/tests/integration/api_nodeinfo_test.go
@@ -32,7 +32,7 @@ func TestNodeinfo(t *testing.T) {
DecodeJSON(t, resp, &nodeinfo)
assert.True(t, nodeinfo.OpenRegistrations)
assert.Equal(t, "gitea", nodeinfo.Software.Name)
- assert.Equal(t, 23, nodeinfo.Usage.Users.Total)
+ assert.Equal(t, 24, nodeinfo.Usage.Users.Total)
assert.Equal(t, 17, nodeinfo.Usage.LocalPosts)
assert.Equal(t, 2, nodeinfo.Usage.LocalComments)
})