(t *testing.T)
| 665 | } |
| 666 | |
| 667 | func TestLookupCommand_URLTarget(t *testing.T) { |
| 668 | t.Parallel() |
| 669 | |
| 670 | rt := &mockRuntime{ |
| 671 | commands: types.Commands{ |
| 672 | "feedback": types.Command{ |
| 673 | Description: "Open the feedback site", |
| 674 | URL: "https://example.com/feedback", |
| 675 | }, |
| 676 | }, |
| 677 | } |
| 678 | |
| 679 | cmd, _, ok := LookupCommand(t.Context(), rt, "/feedback") |
| 680 | assert.True(t, ok) |
| 681 | assert.Equal(t, "https://example.com/feedback", cmd.URL) |
| 682 | assert.Empty(t, cmd.Instruction) |
| 683 | } |
| 684 | |
| 685 | func TestLookupCommand_NotACommand(t *testing.T) { |
| 686 | t.Parallel() |
nothing calls this directly
no test coverage detected