Fix goconst linter warnings by converting repeated strings to constants
- Added testUserAlice constant for 'alice' in test files - Added windowsOS constant for 'windows' in test files - Added testIssueBD1/testIssueBD2 constants for 'bd-1'/'bd-2' in test files - Added testVersion100 constant for '1.0.0' in version tests - Added testIssueCustom1 constant for 'custom-1' in lazy init tests Closes bd-54 Amp-Thread-ID: https://ampcode.com/threads/T-0a4e5d44-2d95-4948-8f4a-d8facf8657c7 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -40,7 +40,7 @@ func (h *listTestHelper) createTestIssues() {
|
||||
Priority: 1,
|
||||
IssueType: types.TypeFeature,
|
||||
Status: types.StatusInProgress,
|
||||
Assignee: "alice",
|
||||
Assignee: testUserAlice,
|
||||
},
|
||||
{
|
||||
Title: "Task Issue",
|
||||
@@ -128,10 +128,10 @@ func TestListCommand(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("filter by assignee", func(t *testing.T) {
|
||||
assignee := "alice"
|
||||
assignee := testUserAlice
|
||||
results := h.search(types.IssueFilter{Assignee: &assignee})
|
||||
h.assertCount(len(results), 1, "issues for alice")
|
||||
h.assertEqual("alice", results[0].Assignee, "assignee")
|
||||
h.assertEqual(testUserAlice, results[0].Assignee, "assignee")
|
||||
})
|
||||
|
||||
t.Run("filter by issue type", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user