pastebin/config_test.go
2017-07-02 23:42:34 -07:00

24 lines
408 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestZeroConfig(t *testing.T) {
assert := assert.New(t)
cfg := Config{}
assert.Equal(cfg.expiry, 0)
assert.Equal(cfg.fqdn, "")
}
func TestConfig(t *testing.T) {
assert := assert.New(t)
cfg := Config{expiry: 1800, fqdn: "https://localhost"}
assert.Equal(cfg.expiry, 1800)
assert.Equal(cfg.fqdn, "https://localhost")
}