master
go 18 lines 414 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package funcapi
4
5 import (
6 "testing"
7
8 "github.com/stretchr/testify/assert"
9 )
10
11 func TestMethodConfig_WithPresentationReturnsUpdatedCopy(t *testing.T) {
12 cfg := MethodConfig{ID: "topology"}
13
14 updated := cfg.WithPresentation(map[string]any{"mode": "graph"})
15
16 assert.Nil(t, cfg.Presentation())
17 assert.Equal(t, map[string]any{"mode": "graph"}, updated.Presentation())
18 }