gondole_test.go
author Mikael Berthe <mikael@lilotux.net>
Sat, 15 Apr 2017 00:39:43 +0200
changeset 119 22c8c58ad61b
parent 79 d030a6eb770b
child 120 579912e9d0ef
permissions -rw-r--r--
LoginBasic: Remove useless header

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")
}