X Tutup
Skip to content

Commit b31f421

Browse files
committed
Use the entire fixture path
1 parent 59cb247 commit b31f421

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

command/pr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func TestPRList(t *testing.T) {
11-
teardown := test.MockGraphQLResponse("pr.json")
11+
teardown := test.MockGraphQLResponse("test/fixtures/pr.json")
1212
defer teardown()
1313

1414
gitRepo := test.UseTempGitRepo()

test/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ func UseTempGitRepo() *TempGitRepo {
7070
return &TempGitRepo{Remote: remotePath, TearDown: tearDown}
7171
}
7272

73-
func MockGraphQLResponse(fixtureName string) (teardown func()) {
73+
func MockGraphQLResponse(fixturePath string) (teardown func()) {
7474
pwd, _ := os.Getwd()
75-
fixturePath := filepath.Join(pwd, "..", "test", "fixtures", fixtureName)
75+
fixturePath := filepath.Join(pwd, "..", fixturePath)
7676

7777
originalGraphQL := api.GraphQL
7878
api.GraphQL = func(query string, variables map[string]string, v interface{}) error {

0 commit comments

Comments
 (0)
X Tutup