(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestGenerateRunEventName(t *testing.T) { |
| 38 | t.Run("generates from root command", func(t *testing.T) { |
| 39 | want := "CLI - Auth0 - Run" |
| 40 | got := generateRunEventName("auth0") |
| 41 | assert.Equal(t, want, got) |
| 42 | }) |
| 43 | |
| 44 | t.Run("generates from top-level command", func(t *testing.T) { |
| 45 | want := "CLI - Auth0 - Apps - Run" |
| 46 | got := generateRunEventName("auth0 apps") |
| 47 | assert.Equal(t, want, got) |
| 48 | }) |
| 49 | |
| 50 | t.Run("generates from subcommand", func(t *testing.T) { |
| 51 | want := "CLI - Apps - List - Run" |
| 52 | got := generateRunEventName("auth0 apps list") |
| 53 | assert.Equal(t, want, got) |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | func TestNewEvent(t *testing.T) { |
| 58 | t.Run("creates a new event instance", func(t *testing.T) { |
nothing calls this directly
no test coverage detected