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
@@ -138,7 +138,7 @@ var expectedListingPosts2 = []*Post{
}
func TestListingsService_Get(t *testing.T) {
setup()
client, mux, teardown := setup()
defer teardown()
blob, err := readFileContents("../testdata/listings/posts-comments-subreddits.json")
@@ -165,7 +165,7 @@ func TestListingsService_Get(t *testing.T) {
}
func TestListingsService_GetPosts(t *testing.T) {
setup()
client, mux, teardown := setup()
defer teardown()
blob, err := readFileContents("../testdata/listings/posts.json")