diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-09-20 09:59:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 15:59:20 +0800 |
commit | 1b630ff7cdbb2ec48b67f8e3295c142f5ad77180 (patch) | |
tree | 94b691df8f8a5ced3b5cba28f975d360cff89b31 /tests | |
parent | a196302472d559f04ed9a4387156bedf26b7c55d (diff) | |
download | gitea-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')
-rw-r--r-- | tests/integration/api_nodeinfo_test.go | 2 |
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) }) |