aboutsummaryrefslogtreecommitdiffstats
path: root/skate/schema_test.go
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-28 23:25:39 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-28 23:25:39 +0200
commita1ca3f5f468a022442c330ef3a63b7bfc217f736 (patch)
tree9400edaf98c929096c108a7bb93dbdfae1fdc577 /skate/schema_test.go
parent822028bcb708d66fdcbbe784caa1d8817d3ae6dd (diff)
downloadrefcat-a1ca3f5f468a022442c330ef3a63b7bfc217f736.tar.gz
refcat-a1ca3f5f468a022442c330ef3a63b7bfc217f736.zip
schema: fix test
Diffstat (limited to 'skate/schema_test.go')
-rw-r--r--skate/schema_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/skate/schema_test.go b/skate/schema_test.go
index 5bc1acc..9fe808b 100644
--- a/skate/schema_test.go
+++ b/skate/schema_test.go
@@ -12,12 +12,12 @@ import (
// XXX: Work on JSON directly, as structs can get unwieldy.
func TestOpenLibraryToRelease(t *testing.T) {
var cases = []struct {
- work OpenLibraryWork
+ work OpenLibrarySolrDoc
release Release
err error
}{
{
- work: OpenLibraryWork{},
+ work: OpenLibrarySolrDoc{},
release: Release{
ExtIDs: struct {
Arxiv string `json:"arxiv,omitempty"`
@@ -34,7 +34,7 @@ func TestOpenLibraryToRelease(t *testing.T) {
err: nil,
},
{
- work: OpenLibraryWork{
+ work: OpenLibrarySolrDoc{
Title: "Hello World",
Isbn: []string{
"2844273386",
@@ -60,7 +60,7 @@ func TestOpenLibraryToRelease(t *testing.T) {
err: nil,
},
{
- work: OpenLibraryWork{
+ work: OpenLibrarySolrDoc{
Key: "/works/OL10000003W",
Title: "Hello World",
Isbn: []string{
@@ -127,7 +127,7 @@ func TestOpenLibraryToRelease(t *testing.T) {
},
}
for _, c := range cases {
- r, err := OpenLibraryWorkToRelease(&c.work)
+ r, err := OpenLibrarySolrDocToRelease(&c.work)
if err != nil {
t.Fatalf("got %v, want %v", err, c.err)
}