aboutsummaryrefslogtreecommitdiffstats
path: root/services/forms/repo_form_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/forms/repo_form_test.go')
-rw-r--r--services/forms/repo_form_test.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/services/forms/repo_form_test.go b/services/forms/repo_form_test.go
index 2c5a8e2c0f..a0c67fe0f8 100644
--- a/services/forms/repo_form_test.go
+++ b/services/forms/repo_form_test.go
@@ -6,8 +6,6 @@ package forms
import (
"testing"
- "code.gitea.io/gitea/modules/setting"
-
"github.com/stretchr/testify/assert"
)
@@ -39,26 +37,3 @@ func TestSubmitReviewForm_IsEmpty(t *testing.T) {
assert.Equal(t, v.expected, v.form.HasEmptyContent())
}
}
-
-func TestIssueLock_HasValidReason(t *testing.T) {
- // Init settings
- _ = setting.Repository
-
- cases := []struct {
- form IssueLockForm
- expected bool
- }{
- {IssueLockForm{""}, true}, // an empty reason is accepted
- {IssueLockForm{"Off-topic"}, true},
- {IssueLockForm{"Too heated"}, true},
- {IssueLockForm{"Spam"}, true},
- {IssueLockForm{"Resolved"}, true},
-
- {IssueLockForm{"ZZZZ"}, false},
- {IssueLockForm{"I want to lock this issue"}, false},
- }
-
- for _, v := range cases {
- assert.Equal(t, v.expected, v.form.HasValidReason())
- }
-}