예제 #1
0
// NewTestClient will return a new heroku.Client that's configured to interact
// with a instance of the empire HTTP server.
func NewTestClient(t testing.TB, e *empire.Empire) (*hooker.Client, *httptest.Server) {
	s := empiretest.NewServer(t, e)

	c := hooker.NewClient(nil)
	c.URL = s.URL
	c.Secret = "abcd"

	return c, s
}
예제 #2
0
// newClient will return a new heroku.Client that's configured to interact
// with a instance of the empire HTTP server.
func newClient(t testing.TB) *client {
	e := empiretest.NewEmpire(t)
	s := empiretest.NewServer(t, e)

	c := hooker.NewClient(nil)
	c.URL = s.URL
	c.Secret = "abcd"

	return &client{
		Server: s,
		Client: c,
	}
}