Skip to content

Commit 1f500ab

Browse files
committed
Add test cases for issues, notifications, and discussions toolsets in instruction generation
1 parent 1690c70 commit 1f500ab

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

pkg/github/instructions_test.go

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,41 @@ func TestGenerateInstructions(t *testing.T) {
3939
},
4040
},
4141
{
42-
name: "cross-toolset instructions",
42+
name: "issues toolset",
43+
enabledToolsets: []string{"issues"},
44+
expectedContains: []string{
45+
"search_issues",
46+
"list_issue_types",
47+
"state_reason",
48+
},
49+
},
50+
{
51+
name: "notifications toolset",
52+
enabledToolsets: []string{"notifications"},
53+
expectedContains: []string{
54+
"participating",
55+
"mark_all_notifications_read",
56+
"repository filters",
57+
},
58+
},
59+
{
60+
name: "discussions toolset",
61+
enabledToolsets: []string{"discussions"},
62+
expectedContains: []string{
63+
"list_discussion_categories",
64+
"Filter by category",
65+
},
66+
},
67+
{
68+
name: "multiple toolsets (context + pull_requests)",
4369
enabledToolsets: []string{"context", "pull_requests"},
4470
expectedContains: []string{
4571
"get_me",
4672
"create_pending_pull_request_review",
4773
},
4874
},
4975
{
50-
name: "issues and pull_requests combination",
76+
name: "multiple toolsets (issues + pull_requests)",
5177
enabledToolsets: []string{"issues", "pull_requests"},
5278
expectedContains: []string{
5379
"search_issues",
@@ -90,6 +116,14 @@ func TestGetToolsetInstructions(t *testing.T) {
90116
toolset: "issues",
91117
expected: "list_issue_types",
92118
},
119+
{
120+
toolset: "notifications",
121+
expected: "participating",
122+
},
123+
{
124+
toolset: "discussions",
125+
expected: "list_discussion_categories",
126+
},
93127
{
94128
toolset: "nonexistent",
95129
expected: "",

0 commit comments

Comments
 (0)