Commit dfa1f983 authored by Erick Hitter's avatar Erick Hitter

Introduce a unit test

parent fb232095
package main
import "testing"
func TestValidatePath(t *testing.T) {
emptyString := ""
notValid := validatePath(&emptyString)
if notValid == true {
t.Error("Empty path shouldn't validate")
sampleConfig := "./config-sample.json"
valid := validatePath(&sampleConfig)
if valid != true {
t.Error("Couldn't validate path to sample config")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment