(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestIssuesGranularToolset(t *testing.T) { |
| 72 | t.Run("toolset contains expected granular tools", func(t *testing.T) { |
| 73 | tools := granularToolsForToolset(ToolsetMetadataIssues.ID, FeatureFlagIssuesGranular) |
| 74 | |
| 75 | toolNames := make([]string, 0, len(tools)) |
| 76 | for _, tool := range tools { |
| 77 | toolNames = append(toolNames, tool.Tool.Name) |
| 78 | } |
| 79 | |
| 80 | expected := []string{ |
| 81 | "create_issue", |
| 82 | "update_issue_title", |
| 83 | "update_issue_body", |
| 84 | "update_issue_assignees", |
| 85 | "update_issue_labels", |
| 86 | "update_issue_milestone", |
| 87 | "update_issue_type", |
| 88 | "update_issue_state", |
| 89 | "add_sub_issue", |
| 90 | "remove_sub_issue", |
| 91 | "reprioritize_sub_issue", |
| 92 | "set_issue_fields", |
| 93 | "add_issue_reaction", |
| 94 | "add_issue_comment_reaction", |
| 95 | } |
| 96 | for _, name := range expected { |
| 97 | assert.Contains(t, toolNames, name) |
| 98 | } |
| 99 | assert.Len(t, tools, len(expected)) |
| 100 | }) |
| 101 | |
| 102 | t.Run("all granular tools have correct feature flag", func(t *testing.T) { |
| 103 | for _, tool := range granularToolsForToolset(ToolsetMetadataIssues.ID, FeatureFlagIssuesGranular) { |
| 104 | assert.Equal(t, FeatureFlagIssuesGranular, tool.FeatureFlagEnable, "tool %s", tool.Tool.Name) |
| 105 | } |
| 106 | }) |
| 107 | } |
| 108 | |
| 109 | func TestPullRequestsGranularToolset(t *testing.T) { |
| 110 | t.Run("toolset contains expected granular tools", func(t *testing.T) { |
nothing calls this directly
no test coverage detected