madon_test.go
author Mikael Berthe <mikael@lilotux.net>
Sat, 04 Feb 2023 12:38:02 +0100
changeset 262 2d2d8633cc27
parent 138 23d3a518d0ad
permissions -rw-r--r--
Bump version to 3.0.0-dev

package madon

import (
	"testing"

	"github.com/sendgrid/rest"
	"github.com/stretchr/testify/assert"
)

func TestPrepareRequest(t *testing.T) {
	mc := &Client{
		Name:    "foo",
		ID:      "666",
		Secret:  "biiiip",
		APIBase: "http://example.com",
	}

	req, err := mc.prepareRequest("bar", rest.Get, nil)
	assert.NoError(t, err, "no error")
	assert.NotNil(t, req.Headers, "not nil")
}