package sfcrmappservice

import (
	"encoding/json"
	"testing"
)

func TestCanonicalActionInputsUsesRuntimeSourceJSONGrammar(t *testing.T) {
	canonical, err := canonicalActionInputs(map[string]any{
		"big":      json.Number("9007199254740993"),
		"htmlBody": "<p>A & B</p>\u2028\u2029",
	})
	if err != nil {
		t.Fatal(err)
	}
	want := "{\"big\":9007199254740993,\"htmlBody\":\"<p>A & B</p>\u2028\u2029\"}"
	if string(canonical) != want {
		t.Fatalf("canonical inputs=%q, want %q", canonical, want)
	}
}
