From dfa1f98323446aecb18d9a228bfd6c412ef42fe0 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Sat, 18 Aug 2018 17:20:51 -0700
Subject: [PATCH] Introduce a unit test

---
 eth-log-alerting_test.go | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 eth-log-alerting_test.go

diff --git a/eth-log-alerting_test.go b/eth-log-alerting_test.go
new file mode 100644
index 0000000..4c11ca1
--- /dev/null
+++ b/eth-log-alerting_test.go
@@ -0,0 +1,19 @@
+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")
+	}
+}
-- 
GitLab