Skip to content

Commit

Permalink
Add test: TestMain_newApp
Browse files Browse the repository at this point in the history
  • Loading branch information
ruedap committed Apr 3, 2015
1 parent edf8c8c commit cee9f42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main_test.go
Expand Up @@ -17,3 +17,12 @@ func setTestEnvHelper(key, val string) func() {
os.Setenv(key, preVal)
}
}

func TestMain_newApp(t *testing.T) {
actual := newApp().Version

expected := "0.1.0"
if actual != expected {
t.Errorf("expected %v to eq %v", actual, expected)
}
}

0 comments on commit cee9f42

Please sign in to comment.