summaryrefslogtreecommitdiffstats
path: root/integrations/privateactivity_test.go
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2021-03-04 22:59:13 +0000
committerGitHub <noreply@github.com>2021-03-04 23:59:13 +0100
commit0a8a3ab0f5b46cc5280976c07a16d8721186f9f6 (patch)
tree92b97a65595dc2752c8a9908fb4aab0c176a3492 /integrations/privateactivity_test.go
parent11229ca53990fcb163b35295a2300daaf3ba7f47 (diff)
downloadgitea-0a8a3ab0f5b46cc5280976c07a16d8721186f9f6.tar.gz
gitea-0a8a3ab0f5b46cc5280976c07a16d8721186f9f6.zip
Show private heatmap on profile to self & admins (#14881)
followup to #14080
Diffstat (limited to 'integrations/privateactivity_test.go')
-rw-r--r--integrations/privateactivity_test.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/integrations/privateactivity_test.go b/integrations/privateactivity_test.go
index 381cb6b338..23c6a7e8cc 100644
--- a/integrations/privateactivity_test.go
+++ b/integrations/privateactivity_test.go
@@ -268,9 +268,6 @@ func TestPrivateActivityNoHeatmapVisibleForAdmin(t *testing.T) {
}
// check heatmap visibility if the visibility is disabled
-// this behavior, in special the one for the admin, is
-// due to the fact that the heatmap is the same for all viewers;
-// otherwise, there is no reason for it
func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) {
defer prepareTestEnv(t)()
@@ -282,7 +279,7 @@ func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) {
assert.False(t, visible, "user should have no visible heatmap")
}
-func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtProfile(t *testing.T) {
+func TestPrivateActivityYesHeatmapVisibleForUserItselfAtProfile(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
testPrivateActivityHelperEnablePrivateActivity(t)
@@ -290,10 +287,10 @@ func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtProfile(t *testing.T)
session := loginUser(t, privateActivityTestUser)
visible := testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t, session)
- assert.False(t, visible, "user should have no visible heatmap")
+ assert.True(t, visible, "user should have visible heatmap")
}
-func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtDashboard(t *testing.T) {
+func TestPrivateActivityYesHeatmapVisibleForUserItselfAtDashboard(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
testPrivateActivityHelperEnablePrivateActivity(t)
@@ -301,7 +298,7 @@ func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtDashboard(t *testing.T
session := loginUser(t, privateActivityTestUser)
visible := testPrivateActivityHelperHasVisibleDashboardHeatmapFromSession(t, session)
- assert.False(t, visible, "user should have no visible heatmap")
+ assert.True(t, visible, "user should have visible heatmap")
}
func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) {
@@ -315,7 +312,7 @@ func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) {
assert.False(t, visible, "user should have no visible heatmap")
}
-func TestPrivateActivityYesHeatmapInvsisibleForAdmin(t *testing.T) {
+func TestPrivateActivityYesHeatmapVisibleForAdmin(t *testing.T) {
defer prepareTestEnv(t)()
testPrivateActivityDoSomethingForActionEntries(t)
testPrivateActivityHelperEnablePrivateActivity(t)
@@ -323,7 +320,7 @@ func TestPrivateActivityYesHeatmapInvsisibleForAdmin(t *testing.T) {
session := loginUser(t, privateActivityTestAdmin)
visible := testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t, session)
- assert.False(t, visible, "user should have no visible heatmap")
+ assert.True(t, visible, "user should have visible heatmap")
}
// check heatmap api provides content if the visibility is enabled