// TestNewRouter tests creating a new router.
func TestNewRouter(t *testing.T) {
	_, err := routers.NewRouter()

	if err != nil {
		t.Fatal("There should not be an error in creating the new router.")
	}
}
Пример #2
0
// main runs the server using Negroni and Mux.
func main() {
	router, _ := routers.NewRouter()

	n := negroni.Classic()
	n.UseHandler(router)

	port := getPort()
	n.Run(":" + port)
}
func init() {
	router, _ := routers.NewRouter()

	testServer = httptest.NewServer(router)

	homeURL = fmt.Sprintf("%s/", testServer.URL)
	learnMoreURL = fmt.Sprintf("%s/learn-more", testServer.URL)

	stubMailer()
}