summaryrefslogtreecommitdiff
path: root/plugins/temporal/protocol/converter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/temporal/protocol/converter_test.go')
-rw-r--r--plugins/temporal/protocol/converter_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/temporal/protocol/converter_test.go b/plugins/temporal/protocol/converter_test.go
new file mode 100644
index 00000000..6ce9fa0f
--- /dev/null
+++ b/plugins/temporal/protocol/converter_test.go
@@ -0,0 +1,23 @@
+package protocol
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "go.temporal.io/api/common/v1"
+ "go.temporal.io/sdk/converter"
+)
+
+func Test_Passthough(t *testing.T) {
+ codec := NewDataConverter(converter.GetDefaultDataConverter())
+
+ value, err := codec.ToPayloads("test")
+ assert.NoError(t, err)
+
+ out := &common.Payloads{}
+
+ assert.Len(t, out.Payloads, 0)
+ assert.NoError(t, codec.FromPayloads(value, &out))
+
+ assert.Len(t, out.Payloads, 1)
+}