/
jamf_test.go
55 lines (45 loc) · 932 Bytes
/
jamf_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
import (
"io/ioutil"
"path"
"testing"
)
func TestClearTemp(t *testing.T) {
clearTemp()
ioutil.WriteFile(path.Join(tempPath, "something.txt"), []byte("Some data."), 0644)
clearTemp()
dir, err := ioutil.ReadDir(tempPath)
if err != nil {
t.Errorf("Got error reading temp. Error: %s", err.Error())
}
if len(dir) > 0 {
t.Error("Could not clear temp.")
}
}
func TestGetGopath(t *testing.T) {
getGopath()
if gopath == "" || boilerPath == "" {
t.Error("Could not get gopath.")
}
}
func TestCheckBoiler(t *testing.T) {
t.SkipNow()
}
func TestGetBoiler(t *testing.T) {
t.SkipNow()
}
func TestInfo(t *testing.T) {
info()
if jamf.Name != "Just Another Mvc Framework" {
t.Errorf("jamf.Name is false. Got: [%s]", jamf.Name)
}
}
func TestCommands(t *testing.T) {
commands()
if len(jamf.Commands) == 0 {
t.Error("Commands did not initialize.")
}
}
func TestMain(t *testing.T) {
t.SkipNow()
}