(t *testing.T)
| 112 | } |
| 113 | |
| 114 | func TestForwardEndpoint(t *testing.T) { |
| 115 | f, err := newForwardEndpoint("http://foo") |
| 116 | if err != nil { |
| 117 | t.Errorf("Unexpected error: %s", err) |
| 118 | } |
| 119 | rb, err := rice.FindBox("templates") |
| 120 | if err != nil { |
| 121 | t.Error(err) |
| 122 | } |
| 123 | templates, err := ricetemp.MakeTemplates(rb) |
| 124 | if err != nil { |
| 125 | panic(err) |
| 126 | } |
| 127 | |
| 128 | f.Handler("", templates, inject.CopyInject{}) |
| 129 | |
| 130 | f, err = newForwardEndpoint("%") |
| 131 | if err == nil { |
| 132 | t.Errorf("Expected error, got %s", f) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func TestNewRoute(t *testing.T) { |
| 137 | r, err := newRoute("foo=http://%", []string{}) |
nothing calls this directly
no test coverage detected