(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func TestToObjects(t *testing.T) { |
| 82 | t.Run("NilShouldReturnNil", func(t *testing.T) { |
| 83 | objects := toObjects(nil) |
| 84 | assert.Nil(t, objects) |
| 85 | }) |
| 86 | t.Run("EmptyShouldReturnEmpty", func(t *testing.T) { |
| 87 | objects := toObjects(make([]string, 0)) |
| 88 | assert.Empty(t, objects) |
| 89 | }) |
| 90 | t.Run("ShouldReturnSliceOfObjects", func(t *testing.T) { |
| 91 | objects := toObjects([]string{"foo", "bar"}) |
| 92 | assert.Equal(t, []any{"foo", "bar"}, objects) |
| 93 | }) |
| 94 | } |