diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-01 00:57:18 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-01 00:57:18 +0200 |
commit | 73bad649ab9b572da60d4f0c07ef43195162c07f (patch) | |
tree | f37a33db5ebd738165cf9307401d59468b23845a | |
parent | 4e85737c1268a62dd40bc39a3f5016462f591d2a (diff) | |
download | refcat-73bad649ab9b572da60d4f0c07ef43195162c07f.tar.gz refcat-73bad649ab9b572da60d4f0c07ef43195162c07f.zip |
zippy: update test
-rw-r--r-- | skate/zippy_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/skate/zippy_test.go b/skate/zippy_test.go index 7290e94..3c1911c 100644 --- a/skate/zippy_test.go +++ b/skate/zippy_test.go @@ -279,6 +279,26 @@ func TestRemoveSelfLinks(t *testing.T) { brefs: []*BiblioRef{}, result: nil, }, + { + brefs: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + result: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + }, + { + brefs: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + result: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + }, } for i, c := range cases { result := removeSelfLinks(c.brefs) |