blacklight-spotlight 3.0.0.alpha.2 → 3.0.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -4
- data/app/assets/javascripts/spotlight/admin/appearance.js +3 -3
- data/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +18 -16
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +19 -20
- data/app/assets/javascripts/spotlight/admin/exhibits.js +6 -1
- data/app/assets/javascripts/spotlight/admin/multi_image_selector.js +1 -1
- data/app/assets/javascripts/spotlight/admin/search_typeahead.js +1 -1
- data/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +1 -1
- data/app/assets/javascripts/spotlight/admin/spotlight_nestable.js +6 -1
- data/app/assets/javascripts/spotlight/admin/tabs.js +2 -2
- data/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +1 -35
- data/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +17 -10
- data/app/assets/stylesheets/spotlight/_browse.scss +11 -18
- data/app/assets/stylesheets/spotlight/_catalog.scss +13 -4
- data/app/assets/stylesheets/spotlight/_curation.scss +21 -14
- data/app/assets/stylesheets/spotlight/_exhibit_navbar.scss +10 -0
- data/app/assets/stylesheets/spotlight/_exhibits_index.scss +4 -48
- data/app/assets/stylesheets/spotlight/_header.scss +3 -1
- data/app/assets/stylesheets/spotlight/_item_text_block.scss +3 -3
- data/app/assets/stylesheets/spotlight/_multi_image_selector.scss +6 -7
- data/app/assets/stylesheets/spotlight/_nestable.scss +12 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +7 -19
- data/app/assets/stylesheets/spotlight/_spotlight.scss +1 -0
- data/app/assets/stylesheets/spotlight/_translations.scss +5 -0
- data/app/controllers/concerns/spotlight/base.rb +2 -2
- data/app/controllers/concerns/spotlight/controller.rb +2 -2
- data/app/controllers/concerns/spotlight/search_helper.rb +2 -0
- data/app/controllers/spotlight/about_pages_controller.rb +1 -1
- data/app/controllers/spotlight/appearances_controller.rb +9 -9
- data/app/controllers/spotlight/browse_controller.rb +1 -1
- data/app/controllers/spotlight/catalog_controller.rb +5 -9
- data/app/controllers/spotlight/concerns/application_controller.rb +3 -3
- data/app/controllers/spotlight/contacts_controller.rb +1 -1
- data/app/controllers/spotlight/custom_fields_controller.rb +1 -1
- data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
- data/app/controllers/spotlight/exhibits_controller.rb +4 -4
- data/app/controllers/spotlight/feature_pages_controller.rb +3 -5
- data/app/controllers/spotlight/filters_controller.rb +1 -3
- data/app/controllers/spotlight/home_pages_controller.rb +1 -1
- data/app/controllers/spotlight/metadata_configurations_controller.rb +1 -1
- data/app/controllers/spotlight/pages_controller.rb +7 -7
- data/app/controllers/spotlight/resources/upload_controller.rb +1 -1
- data/app/controllers/spotlight/resources_controller.rb +1 -1
- data/app/controllers/spotlight/roles_controller.rb +1 -1
- data/app/controllers/spotlight/search_configurations_controller.rb +3 -3
- data/app/controllers/spotlight/searches_controller.rb +12 -12
- data/app/controllers/spotlight/sites_controller.rb +5 -5
- data/app/controllers/spotlight/translations_controller.rb +1 -1
- data/app/helpers/spotlight/application_helper.rb +3 -3
- data/app/helpers/spotlight/main_app_helpers.rb +6 -6
- data/app/helpers/spotlight/masthead_helper.rb +19 -0
- data/app/helpers/spotlight/search_configurations_helper.rb +9 -7
- data/app/helpers/spotlight/searches_helper.rb +1 -1
- data/app/jobs/spotlight/add_uploads_from_csv.rb +0 -1
- data/app/jobs/spotlight/reindex_job.rb +4 -4
- data/app/models/concerns/spotlight/access_controls_enforcement_search_builder.rb +1 -1
- data/app/models/concerns/spotlight/exhibit_analytics.rb +2 -2
- data/app/models/concerns/spotlight/solr_document.rb +5 -1
- data/app/models/concerns/spotlight/solr_document/uploaded_resource.rb +2 -2
- data/app/models/spotlight/ability.rb +2 -2
- data/app/models/spotlight/about_page.rb +1 -1
- data/app/models/spotlight/analytics/ga.rb +1 -1
- data/app/models/spotlight/blacklight_configuration.rb +20 -18
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/custom_field.rb +7 -7
- data/app/models/spotlight/exhibit.rb +11 -2
- data/app/models/spotlight/feature_page.rb +1 -1
- data/app/models/spotlight/featured_image.rb +1 -4
- data/app/models/spotlight/home_page.rb +1 -1
- data/app/models/spotlight/page.rb +2 -2
- data/app/models/spotlight/reindexing_log_entry.rb +3 -3
- data/app/models/spotlight/resource.rb +3 -5
- data/app/models/spotlight/resources/iiif_manifest.rb +1 -1
- data/app/models/spotlight/resources/upload.rb +0 -1
- data/app/models/spotlight/role.rb +1 -1
- data/app/models/spotlight/search.rb +3 -3
- data/app/serializers/spotlight/exhibit_export_serializer.rb +10 -10
- data/app/serializers/spotlight/featured_image_representer.rb +1 -1
- data/app/serializers/spotlight/main_navigation_representer.rb +1 -1
- data/app/serializers/spotlight/page_representer.rb +1 -1
- data/app/uploaders/spotlight/attachment_uploader.rb +0 -1
- data/app/views/catalog/_image_default.html.erb +3 -3
- data/app/views/catalog/_save_search.html.erb +2 -2
- data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
- data/app/views/shared/_breadcrumbs.html.erb +1 -1
- data/app/views/shared/_exhibit_navbar.html.erb +3 -3
- data/app/views/shared/_header_navbar.html.erb +1 -1
- data/app/views/shared/_masthead.html.erb +12 -15
- data/app/views/spotlight/about_pages/_contact.html.erb +12 -12
- data/app/views/spotlight/about_pages/_contact_properties.html.erb +16 -12
- data/app/views/spotlight/about_pages/_contacts.html.erb +1 -1
- data/app/views/spotlight/about_pages/_contacts_form.html.erb +2 -2
- data/app/views/spotlight/about_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/appearances/edit.html.erb +27 -31
- data/app/views/spotlight/browse/_search.html.erb +1 -1
- data/app/views/spotlight/browse/_search_box.html.erb +2 -2
- data/app/views/spotlight/browse/_sort_and_per_page.html.erb +1 -1
- data/app/views/spotlight/browse/index.html.erb +3 -2
- data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +1 -1
- data/app/views/spotlight/catalog/_document_admin_table.html.erb +1 -1
- data/app/views/spotlight/contacts/_form.html.erb +2 -2
- data/app/views/spotlight/custom_fields/form_group/_text.html.erb +15 -6
- data/app/views/spotlight/custom_fields/form_group/_vocab.html.erb +15 -6
- data/app/views/spotlight/custom_search_fields/edit.html.erb +5 -5
- data/app/views/spotlight/custom_search_fields/new.html.erb +5 -5
- data/app/views/spotlight/dashboards/_analytics.html.erb +1 -1
- data/app/views/spotlight/dashboards/_page_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_reindexing_activity.html.erb +1 -1
- data/app/views/spotlight/dashboards/_solr_document_activity.html.erb +1 -1
- data/app/views/spotlight/exhibits/_contact.html.erb +1 -1
- data/app/views/spotlight/exhibits/_delete.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card.html.erb +2 -2
- data/app/views/spotlight/exhibits/_exhibit_card_back.html.erb +21 -19
- data/app/views/spotlight/exhibits/_exhibit_card_front.html.erb +5 -3
- data/app/views/spotlight/exhibits/_exhibits.html.erb +3 -5
- data/app/views/spotlight/exhibits/_form.html.erb +3 -3
- data/app/views/spotlight/exhibits/_languages.html.erb +6 -4
- data/app/views/spotlight/feature_pages/_header.html.erb +5 -5
- data/app/views/spotlight/feature_pages/_sidebar.html.erb +1 -1
- data/app/views/spotlight/featured_images/_form.html.erb +2 -2
- data/app/views/spotlight/featured_images/_upload_form.html.erb +2 -2
- data/app/views/spotlight/home_pages/_edit_page_link.html.erb +1 -1
- data/app/views/spotlight/metadata_configurations/edit.html.erb +2 -2
- data/app/views/spotlight/pages/_order_pages.html.erb +1 -1
- data/app/views/spotlight/pages/_page.html.erb +23 -23
- data/app/views/spotlight/pages/_view_type_group.html.erb +1 -1
- data/app/views/spotlight/resources/_external_resources_form.html.erb +10 -2
- data/app/views/spotlight/resources/new.html.erb +2 -2
- data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
- data/app/views/spotlight/roles/index.html.erb +2 -6
- data/app/views/spotlight/search_configurations/_default_per_page.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
- data/app/views/spotlight/search_configurations/_facets.html.erb +22 -22
- data/app/views/spotlight/search_configurations/_search_fields.html.erb +11 -15
- data/app/views/spotlight/search_configurations/_sort.html.erb +19 -19
- data/app/views/spotlight/searches/_form.html.erb +3 -3
- data/app/views/spotlight/searches/_search.html.erb +24 -24
- data/app/views/spotlight/searches/index.html.erb +1 -1
- data/app/views/spotlight/shared/_configuration_sidebar.html.erb +2 -1
- data/app/views/spotlight/shared/_curation_sidebar.html.erb +1 -1
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +1 -0
- data/app/views/spotlight/sir_trevor/blocks/_oembed_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -2
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +6 -6
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb +15 -7
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +3 -3
- data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +7 -6
- data/app/views/spotlight/sir_trevor/blocks/_uploaded_items_block.html.erb +4 -4
- data/config/locales/spotlight.en.yml +13 -5
- data/config/locales/spotlight.es.yml +40 -0
- data/config/locales/spotlight.pt-BR.yml +25 -0
- data/config/routes.rb +14 -14
- data/lib/generators/spotlight/install_generator.rb +1 -1
- data/lib/generators/spotlight/scaffold_resource_generator.rb +1 -1
- data/lib/generators/spotlight/templates/config/initializers/translation.rb +5 -5
- data/lib/spotlight/engine.rb +12 -11
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +2 -2
- data/spec/controllers/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/about_pages_controller_spec.rb +10 -0
- data/spec/controllers/spotlight/admin_users_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/appearances_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/application_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/attachments_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/browse_controller_spec.rb +5 -4
- data/spec/controllers/spotlight/catalog_controller_spec.rb +18 -4
- data/spec/controllers/spotlight/confirmations_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/contact_forms_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/contacts_controller_spec.rb +3 -0
- data/spec/controllers/spotlight/custom_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/dashboards_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/exhibits_controller_spec.rb +4 -2
- data/spec/controllers/spotlight/feature_pages_controller_spec.rb +13 -1
- data/spec/controllers/spotlight/featured_images_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/home_pages_controller_spec.rb +5 -2
- data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/pages_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/resources/upload_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/resources_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/roles_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/search_configurations_controller_spec.rb +2 -1
- data/spec/controllers/spotlight/searches_controller_spec.rb +4 -0
- data/spec/controllers/spotlight/sites_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/tags_controller_spec.rb +1 -0
- data/spec/controllers/spotlight/translations_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/versions_controller_spec.rb +2 -0
- data/spec/controllers/spotlight/view_configurations_controller_spec.rb +2 -1
- data/spec/examples.txt +1382 -50
- data/spec/factories/contact_emails.rb +1 -1
- data/spec/factories/contact_images.rb +1 -1
- data/spec/factories/contacts.rb +1 -1
- data/spec/factories/custom_fields.rb +1 -1
- data/spec/factories/custom_search_fields.rb +1 -1
- data/spec/factories/exhibit_thumbnails.rb +1 -1
- data/spec/factories/exhibits.rb +1 -1
- data/spec/factories/featured_images.rb +2 -2
- data/spec/factories/language.rb +1 -1
- data/spec/factories/main_navigation.rb +1 -1
- data/spec/factories/reindexing_log_entries.rb +6 -6
- data/spec/factories/resources.rb +2 -2
- data/spec/factories/roles.rb +1 -1
- data/spec/factories/searches.rb +2 -2
- data/spec/factories/tags.rb +2 -2
- data/spec/features/about_page_spec.rb +1 -0
- data/spec/features/add_contacts_spec.rb +2 -1
- data/spec/features/add_custom_field_metadata_spec.rb +3 -0
- data/spec/features/add_iiif_manifest_spec.rb +1 -0
- data/spec/features/add_items_spec.rb +1 -0
- data/spec/features/browse_category_admin_spec.rb +3 -1
- data/spec/features/browse_category_spec.rb +4 -1
- data/spec/features/catalog_spec.rb +1 -0
- data/spec/features/create_exhibit_spec.rb +1 -0
- data/spec/features/create_page_spec.rb +1 -0
- data/spec/features/edit_contact_spec.rb +1 -0
- data/spec/features/edit_search_fields_spec.rb +4 -3
- data/spec/features/exhibit_masthead_spec.rb +4 -4
- data/spec/features/exhibits/administration_spec.rb +11 -2
- data/spec/features/exhibits/edit_metadata_fields_spec.rb +3 -2
- data/spec/features/exhibits/language_create_edit_spec.rb +1 -0
- data/spec/features/exhibits/translation_editing_spec.rb +5 -3
- data/spec/features/exhibits_index_spec.rb +2 -2
- data/spec/features/feature_page_spec.rb +6 -2
- data/spec/features/home_page_spec.rb +3 -1
- data/spec/features/import_exhibit_spec.rb +1 -0
- data/spec/features/item_admin_spec.rb +4 -2
- data/spec/features/javascript/about_page_admin_spec.rb +2 -1
- data/spec/features/javascript/block_controls_spec.rb +3 -2
- data/spec/features/javascript/blocks/rule_block_spec.rb +1 -0
- data/spec/features/javascript/blocks/solr_documents_block_spec.rb +11 -11
- data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +5 -7
- data/spec/features/javascript/edit_in_place_spec.rb +2 -1
- data/spec/features/javascript/feature_page_admin_spec.rb +1 -1
- data/spec/features/javascript/home_page_edit_spec.rb +1 -1
- data/spec/features/javascript/metadata_admin_spec.rb +3 -1
- data/spec/features/javascript/multi_image_select_spec.rb +3 -2
- data/spec/features/javascript/reindex_monitor_spec.rb +1 -1
- data/spec/features/javascript/roles_admin_spec.rb +1 -0
- data/spec/features/javascript/search_config_admin_spec.rb +3 -1
- data/spec/features/javascript/search_context_spec.rb +5 -4
- data/spec/features/main_navigation_spec.rb +46 -2
- data/spec/features/metadata_admin_spec.rb +1 -0
- data/spec/features/report_a_problem_spec.rb +1 -1
- data/spec/features/site_masthead_spec.rb +3 -3
- data/spec/features/slideshow_spec.rb +1 -1
- data/spec/helpers/spotlight/application_helper_spec.rb +10 -5
- data/spec/helpers/spotlight/crud_link_helpers_spec.rb +3 -0
- data/spec/helpers/spotlight/languages_helper_spec.rb +2 -0
- data/spec/helpers/spotlight/main_app_helpers_spec.rb +10 -6
- data/spec/helpers/spotlight/masthead_helper_spec.rb +51 -0
- data/spec/helpers/spotlight/meta_helper_spec.rb +1 -0
- data/spec/helpers/spotlight/navbar_helper_spec.rb +5 -3
- data/spec/helpers/spotlight/pages_helper_spec.rb +10 -3
- data/spec/helpers/spotlight/title_helper_spec.rb +1 -0
- data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +1 -0
- data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +2 -1
- data/spec/lib/migration/iiif_spec.rb +1 -1
- data/spec/lib/migration/page_language_spec.rb +1 -0
- data/spec/lib/spotlight/controller_spec.rb +4 -4
- data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +2 -1
- data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +5 -2
- data/spec/models/solr_document_spec.rb +19 -10
- data/spec/models/spotlight/ability_spec.rb +3 -1
- data/spec/models/spotlight/about_page_spec.rb +6 -3
- data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +2 -1
- data/spec/models/spotlight/analytics/ga_spec.rb +1 -1
- data/spec/models/spotlight/blacklight_configuration_spec.rb +36 -31
- data/spec/models/spotlight/contact_email_spec.rb +4 -3
- data/spec/models/spotlight/contact_form_spec.rb +3 -2
- data/spec/models/spotlight/contact_spec.rb +4 -3
- data/spec/models/spotlight/custom_field_spec.rb +17 -8
- data/spec/models/spotlight/custom_search_field_spec.rb +2 -0
- data/spec/models/spotlight/custom_translation_extension_spec.rb +2 -1
- data/spec/models/spotlight/exhibit_spec.rb +34 -3
- data/spec/models/spotlight/feature_page_spec.rb +21 -9
- data/spec/models/spotlight/field_metadata_spec.rb +4 -4
- data/spec/models/spotlight/home_page_spec.rb +8 -4
- data/spec/models/spotlight/language_spec.rb +1 -0
- data/spec/models/spotlight/masthead_spec.rb +2 -1
- data/spec/models/spotlight/page_configurations_spec.rb +2 -1
- data/spec/models/spotlight/page_spec.rb +14 -8
- data/spec/models/spotlight/reindexing_log_entry_spec.rb +4 -4
- data/spec/models/spotlight/resources/iiif_harvester_spec.rb +5 -3
- data/spec/models/spotlight/resources/iiif_manifest_spec.rb +6 -2
- data/spec/models/spotlight/resources/iiif_service_spec.rb +4 -1
- data/spec/models/spotlight/resources/open_graph_spec.rb +3 -2
- data/spec/models/spotlight/resources/upload_spec.rb +7 -2
- data/spec/models/spotlight/role_spec.rb +5 -0
- data/spec/models/spotlight/search_spec.rb +4 -1
- data/spec/models/spotlight/sitemap_spec.rb +2 -2
- data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +2 -1
- data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +3 -1
- data/spec/models/spotlight/solr_document_sidecar_spec.rb +8 -7
- data/spec/models/spotlight/user_spec.rb +1 -0
- data/spec/models/translation_spec.rb +3 -2
- data/spec/serializers/spotlight/exhibit_export_serializer_spec.rb +24 -23
- data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +2 -1
- data/spec/services/spotlight/iiif_resource_resolver_spec.rb +3 -2
- data/spec/services/spotlight/solr_document_builder_spec.rb +2 -1
- data/spec/spec_helper.rb +4 -4
- data/spec/support/features/test_features_helpers.rb +1 -1
- data/spec/test_app_templates/Gemfile.extra +1 -1
- data/spec/test_app_templates/catalog_controller.rb +1 -1
- data/spec/test_app_templates/spotlight_test.rake +1 -1
- data/spec/uploaders/spotlight/attachment_uploader_spec.rb +2 -1
- data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +2 -1
- data/spec/views/shared/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +5 -5
- data/spec/views/shared/_masthead.html.erb_spec.rb +4 -1
- data/spec/views/shared/_user_util_links.html.erb_spec.rb +9 -2
- data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +4 -1
- data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +2 -0
- data/spec/views/spotlight/browse/_search.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/browse/index.html.erb_spec.rb +3 -1
- data/spec/views/spotlight/browse/show.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +6 -5
- data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_exhibit_card_front.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/_form.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/edit.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/new.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +4 -3
- data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/resources/new.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +2 -2
- data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +1 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +2 -1
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +17 -3
- data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +8 -1
- data/spec/views/spotlight/tags/index.html.erb_spec.rb +1 -0
- data/spec/views/spotlight/translations/_page.html.erb_spec.rb +1 -0
- metadata +158 -152
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
describe Spotlight::SolrDocumentSidecar, type: :model do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
|
5
6
|
before do
|
6
7
|
allow(subject).to receive_messages exhibit: exhibit
|
7
8
|
allow(subject).to receive_messages document: SolrDocument.new(id: 'doc_id')
|
@@ -12,9 +13,9 @@ describe Spotlight::SolrDocumentSidecar, type: :model do
|
|
12
13
|
subject.data = { 'a_tesim' => 1, 'b_tesim' => 2, 'c_tesim' => 3 }
|
13
14
|
end
|
14
15
|
|
15
|
-
its(:to_solr) {
|
16
|
-
its(:to_solr) {
|
17
|
-
its(:to_solr) {
|
16
|
+
its(:to_solr) { is_expected.to include id: 'doc_id' }
|
17
|
+
its(:to_solr) { is_expected.to include "exhibit_#{exhibit.slug}_public_bsi".to_sym => true }
|
18
|
+
its(:to_solr) { is_expected.to include 'a_tesim', 'b_tesim', 'c_tesim' }
|
18
19
|
|
19
20
|
context 'with an uploaded item' do
|
20
21
|
before do
|
@@ -26,7 +27,7 @@ describe Spotlight::SolrDocumentSidecar, type: :model do
|
|
26
27
|
Spotlight::UploadFieldConfig.new(field_name: 'some_configured_field', solr_fields: ['the_solr_field'])
|
27
28
|
end
|
28
29
|
|
29
|
-
its(:to_solr) {
|
30
|
+
its(:to_solr) { is_expected.to include 'the_solr_field' => 'some value' }
|
30
31
|
end
|
31
32
|
|
32
33
|
context 'with blank fields' do
|
@@ -38,9 +39,9 @@ describe Spotlight::SolrDocumentSidecar, type: :model do
|
|
38
39
|
}
|
39
40
|
end
|
40
41
|
|
41
|
-
its(:to_solr) {
|
42
|
-
its(:to_solr) {
|
43
|
-
its(:to_solr) {
|
42
|
+
its(:to_solr) { is_expected.to include 'a_blank_field' => nil }
|
43
|
+
its(:to_solr) { is_expected.to include 'a_blank_multivalued_field' => [] }
|
44
|
+
its(:to_solr) { is_expected.to include 'a_multivalued_field_with_some_blanks' => ['a'] }
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
describe Translation, type: :model do
|
4
4
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
|
5
6
|
describe 'is unique by key, locale, and exhibit' do
|
6
7
|
it 'fails validation' do
|
7
|
-
|
8
|
+
described_class.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'yo')
|
8
9
|
expect do
|
9
|
-
|
10
|
+
described_class.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'lo')
|
10
11
|
end.to raise_error(ActiveRecord::RecordNotUnique)
|
11
12
|
end
|
12
13
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
describe Spotlight::ExhibitExportSerializer do
|
4
|
+
subject { JSON.parse(described_class.new(source_exhibit).to_json) }
|
5
|
+
|
4
6
|
let!(:source_exhibit) { FactoryBot.create(:exhibit) }
|
5
7
|
|
6
8
|
before do
|
@@ -9,15 +11,13 @@ describe Spotlight::ExhibitExportSerializer do
|
|
9
11
|
allow_any_instance_of(Spotlight::Resource).to receive(:reindex)
|
10
12
|
end
|
11
13
|
|
12
|
-
subject { JSON.parse(described_class.new(source_exhibit).to_json) }
|
13
|
-
|
14
14
|
it 'does not include unique identifiers' do
|
15
|
-
expect(subject).
|
16
|
-
expect(subject).
|
17
|
-
expect(subject).
|
18
|
-
expect(subject).
|
19
|
-
expect(subject).
|
20
|
-
expect(subject).
|
15
|
+
expect(subject).not_to have_key 'id'
|
16
|
+
expect(subject).not_to have_key 'slug'
|
17
|
+
expect(subject).not_to have_key 'name'
|
18
|
+
expect(subject).not_to have_key 'default'
|
19
|
+
expect(subject).not_to have_key 'masthead_id'
|
20
|
+
expect(subject).not_to have_key 'thumbnail_id'
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'has search attributes' do
|
@@ -26,9 +26,9 @@ describe Spotlight::ExhibitExportSerializer do
|
|
26
26
|
|
27
27
|
it 'has home page attributes' do
|
28
28
|
expect(subject).to have_key 'home_page'
|
29
|
-
expect(subject['home_page']).
|
30
|
-
expect(subject['home_page']).
|
31
|
-
expect(subject['home_page']).
|
29
|
+
expect(subject['home_page']).not_to have_key 'id'
|
30
|
+
expect(subject['home_page']).not_to have_key 'scope'
|
31
|
+
expect(subject['home_page']).not_to have_key 'exhibit_id'
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'has about pages' do
|
@@ -57,7 +57,7 @@ describe Spotlight::ExhibitExportSerializer do
|
|
57
57
|
expect(subject['solr_document_sidecars']).to have(source_exhibit.solr_document_sidecars.count).items
|
58
58
|
|
59
59
|
expect(subject['solr_document_sidecars'].first).to include('document_id', 'public')
|
60
|
-
expect(subject['solr_document_sidecars'].first).
|
60
|
+
expect(subject['solr_document_sidecars'].first).not_to include 'id'
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'has attachments' do
|
@@ -82,6 +82,11 @@ describe Spotlight::ExhibitExportSerializer do
|
|
82
82
|
end
|
83
83
|
|
84
84
|
describe 'should round-trip data' do
|
85
|
+
subject do
|
86
|
+
e = FactoryBot.create(:exhibit)
|
87
|
+
e.import(export).tap(&:save)
|
88
|
+
end
|
89
|
+
|
85
90
|
before do
|
86
91
|
sidecar = source_exhibit.solr_document_sidecars.create! document: SolrDocument.new(id: 1), public: false
|
87
92
|
source_exhibit.tag(sidecar, with: 'xyz', on: :tags)
|
@@ -91,11 +96,6 @@ describe Spotlight::ExhibitExportSerializer do
|
|
91
96
|
described_class.new(source_exhibit).as_json
|
92
97
|
end
|
93
98
|
|
94
|
-
subject do
|
95
|
-
e = FactoryBot.create(:exhibit)
|
96
|
-
e.import(export).tap(&:save)
|
97
|
-
end
|
98
|
-
|
99
99
|
it 'has exhibit properties' do
|
100
100
|
expect(subject.title).to eq source_exhibit.title
|
101
101
|
end
|
@@ -128,7 +128,7 @@ describe Spotlight::ExhibitExportSerializer do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
it 'has sidecars' do
|
131
|
-
expect(SolrDocument.new(id: 1).
|
131
|
+
expect(SolrDocument.new(id: 1)).not_to be_public(subject)
|
132
132
|
end
|
133
133
|
|
134
134
|
context 'for an exhibit with contacts' do
|
@@ -138,6 +138,7 @@ describe Spotlight::ExhibitExportSerializer do
|
|
138
138
|
exhibit: source_exhibit,
|
139
139
|
contact_info: { title: 'xyz' })
|
140
140
|
end
|
141
|
+
|
141
142
|
it 'has contacts' do
|
142
143
|
expect(subject.contacts.count).to eq 1
|
143
144
|
contact = subject.contacts.first
|
@@ -336,6 +337,11 @@ describe Spotlight::ExhibitExportSerializer do
|
|
336
337
|
end
|
337
338
|
|
338
339
|
describe 'should export saved searches with query parameters that can be re-generated' do
|
340
|
+
subject do
|
341
|
+
e = FactoryBot.create(:exhibit)
|
342
|
+
e.import(export).tap(&:save)
|
343
|
+
end
|
344
|
+
|
339
345
|
before do
|
340
346
|
source_exhibit.feature_pages.create content: [{
|
341
347
|
type: 'search_results',
|
@@ -348,11 +354,6 @@ describe Spotlight::ExhibitExportSerializer do
|
|
348
354
|
}].to_json
|
349
355
|
end
|
350
356
|
|
351
|
-
subject do
|
352
|
-
e = FactoryBot.create(:exhibit)
|
353
|
-
e.import(export).tap(&:save)
|
354
|
-
end
|
355
|
-
|
356
357
|
let :export do
|
357
358
|
described_class.new(source_exhibit).as_json
|
358
359
|
end
|
@@ -3,10 +3,11 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe Spotlight::CloneTranslatedPageFromLocale do
|
6
|
+
subject(:clone) { described_class.call(locale: language.locale, page: page) }
|
7
|
+
|
6
8
|
let(:exhibit) { FactoryBot.create(:exhibit) }
|
7
9
|
let!(:page) { FactoryBot.create(:feature_page, exhibit: exhibit) }
|
8
10
|
let!(:language) { FactoryBot.create(:language, locale: 'es', exhibit: exhibit) }
|
9
|
-
subject(:clone) { described_class.call(locale: language.locale, page: page) }
|
10
11
|
|
11
12
|
it 'clones the exhibit home page for a particular exhibit' do
|
12
13
|
expect(Spotlight::Page.where(locale: 'es')).not_to be_present
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
describe Spotlight::IiifResourceResolver do
|
4
|
+
subject(:resolver) { described_class.new(resource) }
|
5
|
+
|
4
6
|
let(:fixture_json) do
|
5
7
|
File.open(
|
6
8
|
File.expand_path(File.join('..', 'spec', 'fixtures', 'gk446cj2442-manifest.json'), Rails.root)
|
@@ -17,8 +19,6 @@ describe Spotlight::IiifResourceResolver do
|
|
17
19
|
)
|
18
20
|
end
|
19
21
|
|
20
|
-
subject(:resolver) { described_class.new(resource) }
|
21
|
-
|
22
22
|
before do
|
23
23
|
expect(resolver).to receive(:response).and_return(fixture_json)
|
24
24
|
end
|
@@ -81,6 +81,7 @@ describe Spotlight::IiifResourceResolver do
|
|
81
81
|
|
82
82
|
context 'when the JSON is unparsable' do
|
83
83
|
let(:fixture_json) { 'Some sort of html error!' }
|
84
|
+
|
84
85
|
it 'logs that the JSON was unparsable and falls through to an no-canvas error' do
|
85
86
|
klass = described_class.name
|
86
87
|
expect(Rails.logger).to receive(:warn).with(
|
@@ -20,10 +20,11 @@ describe Spotlight::SolrDocumentBuilder do
|
|
20
20
|
|
21
21
|
describe '#documents_to_index' do
|
22
22
|
context 'when the document belongs to more than one exhibit' do
|
23
|
+
subject { resource.document_builder }
|
24
|
+
|
23
25
|
let(:doc) { SolrDocument.new(id: 'abc123') }
|
24
26
|
let(:resource) { FactoryBot.create(:resource) }
|
25
27
|
let(:resource_alt) { FactoryBot.create(:resource) }
|
26
|
-
subject { resource.document_builder }
|
27
28
|
|
28
29
|
before do
|
29
30
|
allow(Spotlight::Engine.config).to receive(:filter_resources_by_exhibit).and_return(true)
|
data/spec/spec_helper.rb
CHANGED
@@ -47,14 +47,14 @@ end
|
|
47
47
|
require 'spotlight'
|
48
48
|
|
49
49
|
# configure spotlight with all the settings necessary to test functionality
|
50
|
-
Spotlight::Engine.config.exhibit_themes = %w
|
50
|
+
Spotlight::Engine.config.exhibit_themes = %w[default modern]
|
51
51
|
|
52
52
|
Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
|
53
53
|
|
54
|
-
FactoryBot.definition_file_paths = [File.expand_path('
|
54
|
+
FactoryBot.definition_file_paths = [File.expand_path('factories', __dir__)]
|
55
55
|
FactoryBot.find_definitions
|
56
56
|
|
57
|
-
FIXTURES_PATH = File.expand_path('
|
57
|
+
FIXTURES_PATH = File.expand_path('fixtures', __dir__)
|
58
58
|
|
59
59
|
RSpec.configure do |config|
|
60
60
|
config.infer_spec_type_from_file_location!
|
@@ -62,7 +62,7 @@ RSpec.configure do |config|
|
|
62
62
|
|
63
63
|
config.use_transactional_fixtures = true
|
64
64
|
|
65
|
-
config.before
|
65
|
+
config.before do
|
66
66
|
# The first user is automatically granted admin privileges; we don't want that behavior for many of our tests
|
67
67
|
Spotlight::Engine.user_class.create email: 'initial+admin@example.com', password: 'password', password_confirmation: 'password'
|
68
68
|
end
|
@@ -45,7 +45,7 @@ module Spotlight
|
|
45
45
|
EOF
|
46
46
|
click_button('Save changes')
|
47
47
|
# verify that the page was created
|
48
|
-
expect(page).
|
48
|
+
expect(page).not_to have_selector('.alert-danger')
|
49
49
|
expect(page).to have_selector('.alert-info', text: 'page was successfully updated')
|
50
50
|
end
|
51
51
|
|
@@ -29,7 +29,7 @@ class CatalogController < ApplicationController
|
|
29
29
|
config.index.display_type_field = 'content_metadata_type_ssm'
|
30
30
|
config.index.thumbnail_field = Spotlight::Engine.config.thumbnail_field
|
31
31
|
|
32
|
-
config.view.gallery.partials = [
|
32
|
+
config.view.gallery.partials = %i[index_header index]
|
33
33
|
config.view.slideshow.partials = [:index]
|
34
34
|
|
35
35
|
config.show.tile_source_field = :content_metadata_image_iiif_info_ssm
|
@@ -6,7 +6,7 @@ namespace :spotlight_test do
|
|
6
6
|
namespace :solr do
|
7
7
|
desc 'Index test data into solr; must be run from within an app (see spotlight:fixtures)'
|
8
8
|
task :seed do
|
9
|
-
docs = YAML.
|
9
|
+
docs = YAML.safe_load(File.open(File.expand_path(File.join('..', 'spec', 'fixtures', 'sample_solr_documents.yml'), Rails.root)))
|
10
10
|
Blacklight.default_index.connection.add docs
|
11
11
|
Blacklight.default_index.connection.commit
|
12
12
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
describe Spotlight::AttachmentUploader do
|
4
|
-
let(:mounter) { Spotlight::Attachment.new(id: '5') }
|
5
4
|
subject(:attachment_uploader) { described_class.new(mounter, 'mounted_as') }
|
6
5
|
|
6
|
+
let(:mounter) { Spotlight::Attachment.new(id: '5') }
|
7
|
+
|
7
8
|
describe '#store_dir' do
|
8
9
|
let(:store_dir) { attachment_uploader.store_dir }
|
9
10
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
describe Spotlight::FeaturedImageUploader do
|
4
|
-
let(:mounter) { FactoryBot.create(:featured_image) }
|
5
4
|
subject(:featured_image_uploader) { described_class.new(mounter, 'mounted_as') }
|
6
5
|
|
6
|
+
let(:mounter) { FactoryBot.create(:featured_image) }
|
7
|
+
|
7
8
|
describe '#extension_whitelist' do
|
8
9
|
it 'is the configured array of approved extension to be uploaded' do
|
9
10
|
expect(featured_image_uploader.extension_whitelist).to eq Spotlight::Engine.config.allowed_upload_extensions
|
@@ -5,6 +5,7 @@ describe 'shared/_analytics', type: :view do
|
|
5
5
|
render
|
6
6
|
expect(rendered).to be_empty
|
7
7
|
end
|
8
|
+
|
8
9
|
it 'renders the GA script tag if the web property id is configured' do
|
9
10
|
allow(Spotlight::Engine.config).to receive(:ga_web_property_id).and_return('XYZ-234')
|
10
11
|
allow(Spotlight::Engine.config).to receive(:ga_anonymize_ip).and_return(true)
|
@@ -49,13 +49,13 @@ describe 'shared/_exhibit_navbar', type: :view do
|
|
49
49
|
|
50
50
|
it 'does not display links to feature pages if none are defined' do
|
51
51
|
render
|
52
|
-
expect(response).
|
52
|
+
expect(response).not_to have_link 'Curated Features'
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'does not display links to feature pages that are not published' do
|
56
56
|
unpublished_feature_page
|
57
57
|
render
|
58
|
-
expect(response).
|
58
|
+
expect(response).not_to have_link 'Curated Features'
|
59
59
|
end
|
60
60
|
|
61
61
|
it "links to the browse index if there's a published search" do
|
@@ -90,13 +90,13 @@ describe 'shared/_exhibit_navbar', type: :view do
|
|
90
90
|
|
91
91
|
it 'does not link to the about page if no about page exists' do
|
92
92
|
render
|
93
|
-
expect(response).
|
93
|
+
expect(response).not_to have_link 'About'
|
94
94
|
end
|
95
95
|
|
96
96
|
it 'does not to the about page if none are published' do
|
97
97
|
unpublished_about_page
|
98
98
|
render
|
99
|
-
expect(response).
|
99
|
+
expect(response).not_to have_link 'About'
|
100
100
|
end
|
101
101
|
|
102
102
|
it "marks the about button as active if we're on an about page" do
|
@@ -115,7 +115,7 @@ describe 'shared/_exhibit_navbar', type: :view do
|
|
115
115
|
it 'does not include the search bar when the exhibit is not searchable' do
|
116
116
|
expect(current_exhibit).to receive(:searchable?).and_return(false)
|
117
117
|
render
|
118
|
-
expect(response).
|
118
|
+
expect(response).not_to have_content 'Search Bar'
|
119
119
|
end
|
120
120
|
|
121
121
|
it 'does not include any navigation menu items that are not configured' do
|
@@ -8,6 +8,8 @@ describe 'shared/_masthead', type: :view do
|
|
8
8
|
stub_template 'shared/_exhibit_navbar.html.erb' => 'navbar'
|
9
9
|
allow(view).to receive_messages(current_exhibit: exhibit,
|
10
10
|
current_masthead: masthead,
|
11
|
+
masthead_heading_content: exhibit.title,
|
12
|
+
masthead_subheading_content: exhibit.subtitle,
|
11
13
|
resource_masthead?: false)
|
12
14
|
end
|
13
15
|
|
@@ -19,7 +21,7 @@ describe 'shared/_masthead', type: :view do
|
|
19
21
|
|
20
22
|
context 'for an exhibit without a subtitle' do
|
21
23
|
before do
|
22
|
-
|
24
|
+
allow(view).to receive_messages(masthead_subheading_content: nil)
|
23
25
|
end
|
24
26
|
|
25
27
|
it 'does not include the subtitle' do
|
@@ -68,6 +70,7 @@ describe 'shared/_masthead', type: :view do
|
|
68
70
|
render
|
69
71
|
expect(rendered).to have_selector '.masthead.resource-masthead'
|
70
72
|
end
|
73
|
+
|
71
74
|
it 'puts the navbar before the title' do
|
72
75
|
render
|
73
76
|
expect(rendered.index('navbar')).to be < rendered.index(exhibit.title)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
describe 'shared/_user_util_links', type: :view do
|
4
4
|
let(:current_exhibit) { FactoryBot.create(:exhibit) }
|
5
|
+
|
5
6
|
before do
|
6
7
|
allow(view).to receive(:blacklight_config).and_return(Blacklight::Configuration.new)
|
7
8
|
allow(view).to receive(:current_user).and_return(current_user)
|
@@ -11,6 +12,7 @@ describe 'shared/_user_util_links', type: :view do
|
|
11
12
|
|
12
13
|
describe 'when user is not logged in' do
|
13
14
|
let(:current_user) { nil }
|
15
|
+
|
14
16
|
it 'renders the links' do
|
15
17
|
render
|
16
18
|
expect(rendered).to have_link 'Sign in'
|
@@ -20,28 +22,31 @@ describe 'shared/_user_util_links', type: :view do
|
|
20
22
|
|
21
23
|
describe 'when show_contact_form is false' do
|
22
24
|
let(:current_user) { nil }
|
25
|
+
|
23
26
|
before do
|
24
27
|
allow(view).to receive_messages(show_contact_form?: false)
|
25
28
|
end
|
26
29
|
|
27
30
|
it 'does not render the feedback link' do
|
28
31
|
render
|
29
|
-
expect(rendered).
|
32
|
+
expect(rendered).not_to have_link 'Feedback'
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
33
36
|
describe 'when user is logged in' do
|
34
37
|
let(:current_user) { Spotlight::Engine.user_class.new }
|
38
|
+
|
35
39
|
it 'renders the links' do
|
36
40
|
render
|
37
41
|
expect(rendered).to have_link 'Feedback'
|
38
|
-
expect(rendered).
|
42
|
+
expect(rendered).not_to have_link 'Exhibit dashboard'
|
39
43
|
expect(rendered).to have_link 'Sign out'
|
40
44
|
end
|
41
45
|
end
|
42
46
|
|
43
47
|
describe 'when user is a curator' do
|
44
48
|
let(:current_user) { Spotlight::Engine.user_class.new }
|
49
|
+
|
45
50
|
before do
|
46
51
|
allow(view).to receive(:can?).with(:manage, Spotlight::Site).and_return(false)
|
47
52
|
allow(view).to receive(:can?).with(:update, current_exhibit).and_return(false)
|
@@ -59,6 +64,7 @@ describe 'shared/_user_util_links', type: :view do
|
|
59
64
|
|
60
65
|
describe 'when user is an admin' do
|
61
66
|
let(:current_user) { Spotlight::Engine.user_class.new }
|
67
|
+
|
62
68
|
before do
|
63
69
|
allow(view).to receive(:can?).with(:manage, Spotlight::Site).and_return(false)
|
64
70
|
allow(view).to receive(:can?).with(:update, current_exhibit).and_return(true)
|
@@ -76,6 +82,7 @@ describe 'shared/_user_util_links', type: :view do
|
|
76
82
|
|
77
83
|
describe 'when user is a site-wide admin' do
|
78
84
|
let(:current_user) { Spotlight::Engine.user_class.new }
|
85
|
+
|
79
86
|
before do
|
80
87
|
allow(view).to receive(:can?).with(:manage, Spotlight::Site).and_return(true)
|
81
88
|
allow(view).to receive(:can?).with(:update, current_exhibit).and_return(true)
|