Add missing `getPresentation` mock
diff --git a/talksapp/main_test.go b/talksapp/main_test.go
index afbda2d..936143f 100644
--- a/talksapp/main_test.go
+++ b/talksapp/main_test.go
@@ -115,6 +115,14 @@
}
func TestPresentationNotFound(t *testing.T) {
+ originalGetPresentation := getPresentation
+ getPresentation = func(client *http.Client, importPath string) (*gosrc.Presentation, error) {
+ return nil, gosrc.NotFoundError{}
+ }
+ defer func() {
+ getPresentation = originalGetPresentation
+ }()
+
do(t, "GET", "/"+importPath, func(r *http.Request) {
w := httptest.NewRecorder()
handlerFunc(serveRoot).ServeHTTP(w, r)