Change setup method signature for tests, no global vars

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-08-23 22:34:59 -04:00
parent ba5eea5ed4
commit a64a2fb011
15 changed files with 210 additions and 222 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
)
func TestGoldService_Gild(t *testing.T) {
setup()
client, mux, teardown := setup()
defer teardown()
mux.HandleFunc("/api/v1/gold/gild/t1_test", func(w http.ResponseWriter, r *http.Request) {
@@ -21,7 +21,7 @@ func TestGoldService_Gild(t *testing.T) {
}
func TestGoldService_Give(t *testing.T) {
setup()
client, mux, teardown := setup()
defer teardown()
mux.HandleFunc("/api/v1/gold/give/testuser", func(w http.ResponseWriter, r *http.Request) {