github.com/projectdiscovery/nuclei/v2@v2.9.15/pkg/protocols/common/generators/maps_test.go (about)

     1  package generators
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestMergeMapsMany(t *testing.T) {
    10  	got := MergeMapsMany(map[string]interface{}{"a": []string{"1", "2"}, "c": "5"}, map[string][]string{"b": {"3", "4"}})
    11  	require.Equal(t, map[string][]string{
    12  		"a": {"1", "2"},
    13  		"b": {"3", "4"},
    14  		"c": {"5"},
    15  	}, got, "could not get correct merged map")
    16  }