(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestInstallName(t *testing.T) { |
| 18 | tests := []struct { |
| 19 | name string |
| 20 | skill Skill |
| 21 | wantName string |
| 22 | }{ |
| 23 | { |
| 24 | name: "plain skill", |
| 25 | skill: Skill{Name: "code-review"}, |
| 26 | wantName: "code-review", |
| 27 | }, |
| 28 | { |
| 29 | name: "namespaced skill", |
| 30 | skill: Skill{Name: "issue-triage", Namespace: "monalisa"}, |
| 31 | wantName: "monalisa/issue-triage", |
| 32 | }, |
| 33 | { |
| 34 | name: "plugin skill with namespace", |
| 35 | skill: Skill{Name: "pr-summary", Namespace: "hubot", Convention: "plugins"}, |
| 36 | wantName: "hubot/pr-summary", |
| 37 | }, |
| 38 | } |
| 39 | for _, tt := range tests { |
| 40 | t.Run(tt.name, func(t *testing.T) { |
| 41 | assert.Equal(t, tt.wantName, tt.skill.InstallName()) |
| 42 | }) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func TestMatchSkillConventions(t *testing.T) { |
| 47 | tests := []struct { |
nothing calls this directly
no test coverage detected