summaryrefslogtreecommitdiffstats
path: root/integrations/release_test.go
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-06-09 04:46:51 +0200
committerGitHub <noreply@github.com>2020-06-08 22:46:51 -0400
commitcefbf73aea912c510a8dd194532233076b822d37 (patch)
treee75a011b7563a27e572f4f93670367589fea09fd /integrations/release_test.go
parent5734524378f9388b7a7466445b0b339e2837a5d8 (diff)
downloadgitea-cefbf73aea912c510a8dd194532233076b822d37.tar.gz
gitea-cefbf73aea912c510a8dd194532233076b822d37.zip
Honor DEFAULT_PAGING_NUM for API (#11805)
* Honor DEFAULT_PAGING_NUM for API * set pagination to 10 for tests * lint Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'integrations/release_test.go')
-rw-r--r--integrations/release_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/integrations/release_test.go b/integrations/release_test.go
index 176f83d55a..4d2260d884 100644
--- a/integrations/release_test.go
+++ b/integrations/release_test.go
@@ -10,6 +10,7 @@ import (
"testing"
"time"
+ "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
"github.com/stretchr/testify/assert"
@@ -106,6 +107,12 @@ func TestCreateReleaseDraft(t *testing.T) {
func TestCreateReleasePaging(t *testing.T) {
defer prepareTestEnv(t)()
+ oldAPIDefaultNum := setting.API.DefaultPagingNum
+ defer func() {
+ setting.API.DefaultPagingNum = oldAPIDefaultNum
+ }()
+ setting.API.DefaultPagingNum = 10
+
session := loginUser(t, "user2")
// Create enaugh releases to have paging
for i := 0; i < 12; i++ {