(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestDevdHandler(t *testing.T) { |
| 67 | logger := termlog.NewLog() |
| 68 | logger.Quiet() |
| 69 | templates := ricetemp.MustMakeTemplates(rice.MustFindBox("templates")) |
| 70 | |
| 71 | devd := Devd{LivereloadRoutes: true, WatchPaths: []string{"./"}} |
| 72 | err := devd.AddRoutes([]string{"./"}, []string{}) |
| 73 | if err != nil { |
| 74 | t.Error(err) |
| 75 | } |
| 76 | h, err := devd.Router(logger, templates) |
| 77 | if err != nil { |
| 78 | t.Error(err) |
| 79 | } |
| 80 | ht := handlerTester{t, h} |
| 81 | |
| 82 | AssertCode(t, ht.Request("GET", "/", nil), 200) |
| 83 | AssertCode(t, ht.Request("GET", "/nonexistent", nil), 404) |
| 84 | } |
| 85 | |
| 86 | func TestGetTLSConfig(t *testing.T) { |
| 87 | _, err := getTLSConfig("nonexistent") |
nothing calls this directly
no test coverage detected