diff options
Diffstat (limited to 'skate/zippy_test.go')
-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 d51a459..84c878f 100644 --- a/skate/zippy_test.go +++ b/skate/zippy_test.go @@ -70,6 +70,26 @@ func TestUniqueMatches(t *testing.T) { }}, err: nil, }, + { + about: "if both are exact, we just take (any) one", + docs: []string{` + {"source_release_ident": "s1", + "target_release_ident": "t1", + "match_status": "exact", + "match_reason": "a"}`, + `{"source_release_ident": "s1", + "target_release_ident": "t1", + "match_status": "exact", + "match_reason": "b"}`, + }, + result: []*BiblioRef{&BiblioRef{ + SourceReleaseIdent: "s1", + TargetReleaseIdent: "t1", + MatchStatus: "exact", + MatchReason: "b", + }}, + err: nil, + }, } for _, c := range cases { result, err := uniqueMatches(c.docs) |