diff options
author | 2016-10-12 11:04:26 -0700 | |
---|---|---|
committer | 2016-10-12 11:04:26 -0700 | |
commit | ac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9 (patch) | |
tree | e9a61adde4bc5eef80583f3e1d6f9379a20b4f99 /config_test.go | |
parent | b80c4f3e920994823061eb05dc0a5bc3881ddb02 (diff) | |
download | sally-ac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9.tar.gz sally-ac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9.tar.zst sally-ac8374fd17e30fca9a7773a2a6f690a7ea4d2ec9.zip |
Rework as HTTP server (#15)
Diffstat (limited to 'config_test.go')
-rw-r--r-- | config_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config_test.go b/config_test.go new file mode 100644 index 0000000..10422e9 --- /dev/null +++ b/config_test.go @@ -0,0 +1,29 @@ +package main + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestParse(t *testing.T) { + path, clean := TempFile(t, ` + +url: google.golang.org +packages: + grpc: + repo: github.com/grpc/grpc-go + +`) + defer clean() + + config, err := Parse(path) + assert.NoError(t, err) + + assert.Equal(t, config.URL, "google.golang.org") + + pkg, ok := config.Packages["grpc"] + assert.True(t, ok) + + assert.Equal(t, pkg, Package{Repo: "github.com/grpc/grpc-go"}) +} |