diff options
author | Joe Chen <jc@unknwon.io> | 2022-06-25 18:07:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 18:07:39 +0800 |
commit | 083c3ee659c6c5542687f3bafae68cbc24dbc90f (patch) | |
tree | 0103bf3b5c5ebfccd368a7cb6a425a521fd669d9 /internal/db/action_test.go | |
parent | 9df4e3ae3c555a86f691f0d78a43834842e77d8b (diff) |
db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/action_test.go')
-rw-r--r-- | internal/db/action_test.go | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/internal/db/action_test.go b/internal/db/action_test.go deleted file mode 100644 index afd750bb..00000000 --- a/internal/db/action_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package db - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_issueReferencePattern(t *testing.T) { - tests := []struct { - name string - message string - expStrings []string - }{ - { - name: "no match", - message: "Hello world!", - expStrings: nil, - }, - { - name: "contains issue numbers", - message: "#123 is fixed, and #456 is WIP", - expStrings: []string{"#123", " #456"}, - }, - { - name: "contains full issue references", - message: "#123 is fixed, and user/repo#456 is WIP", - expStrings: []string{"#123", " user/repo#456"}, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - strs := issueReferencePattern.FindAllString(test.message, -1) - assert.Equal(t, test.expStrings, strs) - }) - } -} |