1
0
mirror of https://github.com/taigrr/shorturl synced 2025-01-18 04:03:16 -08:00
shorturl/config_test.go

22 lines
352 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.baseURL, "")
}
func TestConfig(t *testing.T) {
assert := assert.New(t)
cfg := Config{baseURL: "http://localhost:8000/"}
assert.Equal(cfg.baseURL, "http://localhost:8000/")
}