(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestRemoveToolset(t *testing.T) { |
| 89 | tests := []struct { |
| 90 | name string |
| 91 | tools []string |
| 92 | toRemove string |
| 93 | expected []string |
| 94 | }{ |
| 95 | { |
| 96 | name: "remove existing toolset", |
| 97 | tools: []string{"actions", "gists", "notifications"}, |
| 98 | toRemove: "gists", |
| 99 | expected: []string{"actions", "notifications"}, |
| 100 | }, |
| 101 | { |
| 102 | name: "remove from empty slice", |
| 103 | tools: []string{}, |
| 104 | toRemove: "actions", |
| 105 | expected: []string{}, |
| 106 | }, |
| 107 | { |
| 108 | name: "remove duplicate entries", |
| 109 | tools: []string{"actions", "gists", "actions", "notifications"}, |
| 110 | toRemove: "actions", |
| 111 | expected: []string{"gists", "notifications"}, |
| 112 | }, |
| 113 | } |
| 114 | |
| 115 | for _, tt := range tests { |
| 116 | t.Run(tt.name, func(t *testing.T) { |
| 117 | result := RemoveToolset(tt.tools, tt.toRemove) |
| 118 | assert.Equal(t, tt.expected, result) |
| 119 | }) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestContainsToolset(t *testing.T) { |
| 124 | tests := []struct { |
nothing calls this directly
no test coverage detected