gondole_test.go
author Mikael Berthe <mikael@lilotux.net>
Thu, 13 Apr 2017 21:25:10 +0200
changeset 113 bb9aaa5440c1
parent 79 d030a6eb770b
child 120 579912e9d0ef
permissions -rw-r--r--
Add Search() (using endpoint /search)

package gondole

import (
    "testing"
    "github.com/stretchr/testify/assert"
)

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

    req := g.prepareRequest("bar")
    assert.NotNil(t, req.Headers, "not nil")
    assert.NotNil(t, req.QueryParams, "not nil")
}