Skip to content

Commit

Permalink
ref: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesKimara committed Oct 17, 2021
1 parent c778f51 commit 39ad8fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
4 changes: 2 additions & 2 deletions api_assets_test.go
Expand Up @@ -128,7 +128,7 @@ func TestResourceAssetsByPolicyIntegration(t *testing.T) {
testIntUtil(t, fp, &got, &want)
}

type withCustomTest func(got interface{}, want interface{})
type withCustomTest func() func(got interface{}, want interface{})

func testIntUtil(t *testing.T, fp string, got interface{}, want interface{}, opts ...withCustomTest) {
if *update {
Expand All @@ -144,7 +144,7 @@ func testIntUtil(t *testing.T, fp string, got interface{}, want interface{}, opt
}

for _, opt := range opts {
opt(&got, &want)
opt()(&got, &want)
}

if !reflect.DeepEqual(got, want) {
Expand Down
22 changes: 0 additions & 22 deletions ipfs_test.go
Expand Up @@ -103,28 +103,6 @@ func testIPFSResourcePinIntegration(t *testing.T, ipfs blockfrost.IPFSClient, ip
testErrorHelper(t, err)
fp := filepath.Join(testdata, strings.ToLower(strings.TrimPrefix(testNames[len(testNames)-1], "Test"))+".golden")
want := blockfrost.IPFSPinnedObject{}

// if *update {
// data, err := json.Marshal(got)
// if err != nil {
// t.Fatal(err)
// }
// WriteGoldenFile(t, fp, data)
// }
// bytes := ReadOrGenerateGoldenFile(t, fp, got)
// if err := json.Unmarshal(bytes, &want); err != nil {
// t.Fatal(err)
// }

// want.TimeCreated = 0
// want.TimePinned = 0

// got.TimeCreated = 0
// got.TimePinned = 0

// if !reflect.DeepEqual(got, want) {
// t.Fatalf("expected %v got %v", want, got)
// }
testIntUtil(t, fp, &got, &want)

}
Expand Down

0 comments on commit 39ad8fe

Please sign in to comment.