package client

import (
	"encoding/json"
	"testing"

	"github.com/stretchr/testify/require"
)

func TestFlatMarshallSingleMessage(t *testing.T) {
	require := require.New(t)

	message := ChatUserMessage{
		Role: User,
		MessageContent: SingleMessage{
			Content: "Hello",
		},
	}

	json, err := json.Marshal(message)
	require.NoError(err)

	require.Equal(string(json), "{\"role\":\"user\",\"content\":\"Hello\"}")
}
