From 06f33e5eabcf636e9ec7f0f081400c460dc5bc72 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 3 Oct 2022 08:35:36 -0700 Subject: [PATCH] add label and type tests to SearchService and AutocompleteService --- spec/lib/iiif_manifest/v3/manifest_factory_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/lib/iiif_manifest/v3/manifest_factory_spec.rb b/spec/lib/iiif_manifest/v3/manifest_factory_spec.rb index 30b5360..91141cd 100644 --- a/spec/lib/iiif_manifest/v3/manifest_factory_spec.rb +++ b/spec/lib/iiif_manifest/v3/manifest_factory_spec.rb @@ -310,6 +310,8 @@ def sequence_rendering allow(book_presenter).to receive(:search_service).and_return(search_service) expect(result['service'][0]['profile']).to eq 'http://iiif.io/api/search/1/search' expect(result['service'][0]['id']).to eq 'http://test.host/books/book-77/search' + expect(result['service'][0]['label']).to eq 'Search within this manifest' + expect(result['service'][0]['type']).to eq 'SearchService1' expect(result['service'][0]['service']).to eq nil end end @@ -332,6 +334,8 @@ def sequence_rendering allow(book_presenter).to receive(:autocomplete_service).and_return(autocomplete_service) expect(result['service'][0]['service']['id']).to eq 'http://test.host/books/book-77/autocomplete' expect(result['service'][0]['service']['profile']).to eq 'http://iiif.io/api/search/1/autocomplete' + expect(result['service'][0]['service']['label']).to eq 'Get suggested words in this manifest' + expect(result['service'][0]['service']['type']).to eq 'AutoCompleteService1' end end