hyrax 2.1.0.beta1 → 2.1.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -49
- data/.rubocop_fixme.yml +1 -0
- data/.travis.yml +1 -1
- data/Gemfile +3 -3
- data/README.md +4 -2
- data/app/actors/hyrax/actors/file_set_actor.rb +0 -1
- data/app/actors/hyrax/actors/interpret_visibility_actor.rb +1 -3
- data/app/actors/hyrax/actors/model_actor.rb +4 -0
- data/app/assets/javascripts/hyrax.js +1 -1
- data/app/assets/javascripts/hyrax/app.js.erb +1 -1
- data/app/assets/javascripts/hyrax/authority_select.es6 +15 -7
- data/app/assets/javascripts/hyrax/collections.js +188 -9
- data/app/assets/javascripts/hyrax/content_blocks.js +13 -1
- data/app/assets/javascripts/hyrax/editor.es6 +2 -1
- data/app/assets/javascripts/hyrax/proxy_rights.js +2 -2
- data/app/assets/javascripts/hyrax/turbolinks_events.js +5 -0
- data/app/assets/stylesheets/hyrax/_accessibility.scss +21 -0
- data/app/assets/stylesheets/hyrax/_catalog.scss +21 -16
- data/app/assets/stylesheets/hyrax/_collections.scss +48 -7
- data/app/assets/stylesheets/hyrax/_modal.scss +4 -0
- data/app/assets/stylesheets/hyrax/_settings.scss +1 -1
- data/app/assets/stylesheets/hyrax/dashboard.scss +0 -1
- data/app/controllers/concerns/hyrax/breadcrumbs.rb +3 -1
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +17 -1
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +10 -0
- data/app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb +86 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -11
- data/app/controllers/hyrax/admin/collection_types_controller.rb +11 -1
- data/app/controllers/hyrax/api/items_controller.rb +2 -6
- data/app/controllers/hyrax/batch_edits_controller.rb +6 -0
- data/app/controllers/hyrax/batch_uploads_controller.rb +1 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -7
- data/app/controllers/hyrax/dashboard/profiles_controller.rb +2 -0
- data/app/controllers/hyrax/dashboard_controller.rb +2 -2
- data/app/controllers/hyrax/depositors_controller.rb +19 -0
- data/app/controllers/hyrax/downloads_controller.rb +3 -4
- data/app/controllers/hyrax/embargoes_controller.rb +2 -0
- data/app/controllers/hyrax/file_sets_controller.rb +12 -0
- data/app/controllers/hyrax/leases_controller.rb +2 -0
- data/app/controllers/hyrax/my/works_controller.rb +9 -0
- data/app/controllers/hyrax/my_controller.rb +0 -1
- data/app/controllers/hyrax/transfers_controller.rb +1 -3
- data/app/controllers/hyrax/users_controller.rb +1 -3
- data/app/forms/hyrax/forms/admin/collection_type_form.rb +1 -1
- data/app/forms/hyrax/forms/permission_template_form.rb +1 -4
- data/app/forms/hyrax/forms/work_form.rb +1 -3
- data/app/helpers/hyrax/citations_behaviors/common_behavior.rb +1 -3
- data/app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb +1 -5
- data/app/helpers/hyrax/collections_helper.rb +7 -4
- data/app/helpers/hyrax/file_set_helper.rb +0 -1
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +0 -1
- data/app/helpers/hyrax/trophy_helper.rb +0 -1
- data/app/indexers/hyrax/admin_set_indexer.rb +2 -0
- data/app/inputs/multi_value_select_input.rb +1 -3
- data/app/jobs/attach_files_to_work_job.rb +5 -1
- data/app/jobs/import_url_job.rb +9 -8
- data/app/models/admin_set.rb +1 -5
- data/app/models/concerns/hyrax/ability.rb +3 -4
- data/app/models/concerns/hyrax/collection_behavior.rb +0 -4
- data/app/models/concerns/hyrax/collection_nesting.rb +12 -0
- data/app/models/concerns/hyrax/suppressible.rb +1 -5
- data/app/models/featured_work_list.rb +1 -3
- data/app/models/hyrax/collection_type.rb +3 -2
- data/app/models/hyrax/permission_template_access.rb +6 -4
- data/app/models/proxy_deposit_request.rb +1 -1
- data/app/presenters/hyrax/collection_presenter.rb +0 -24
- data/app/presenters/hyrax/displays_image.rb +1 -1
- data/app/presenters/hyrax/file_set_presenter.rb +1 -1
- data/app/presenters/hyrax/menu_presenter.rb +1 -1
- data/app/presenters/hyrax/work_show_presenter.rb +15 -10
- data/app/search_builders/hyrax/abstract_type_relation.rb +2 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +1 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +3 -1
- data/app/search_builders/hyrax/parent_collection_search_builder.rb +2 -2
- data/app/services/hyrax/admin_set_create_service.rb +1 -3
- data/app/services/hyrax/analytics.rb +1 -3
- data/app/services/hyrax/collection_member_service.rb +6 -5
- data/app/services/hyrax/collection_types/create_service.rb +37 -10
- data/app/services/hyrax/collections/permissions_create_service.rb +1 -3
- data/app/services/hyrax/collections/permissions_service.rb +6 -4
- data/app/views/catalog/_index_header_list_collection.html.erb +1 -1
- data/app/views/catalog/_index_header_list_default.html.erb +1 -1
- data/app/views/catalog/_index_list_default.html.erb +6 -10
- data/app/views/catalog/_search_form.html.erb +10 -11
- data/app/views/catalog/_thumbnail_list_collection.html.erb +1 -1
- data/app/views/catalog/_thumbnail_list_default.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_participant_table.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb +3 -3
- data/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/admin/admin_sets/index.html.erb +1 -1
- data/app/views/hyrax/admin/appearances/show.html.erb +4 -4
- data/app/views/hyrax/admin/collection_types/_form_settings.html.erb +3 -2
- data/app/views/hyrax/admin/collection_types/index.html.erb +2 -2
- data/app/views/hyrax/admin/features/index.html.erb +2 -4
- data/app/views/hyrax/admin/stats/_date_form.html.erb +3 -3
- data/app/views/hyrax/admin/stats/_top_data.html.erb +1 -1
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/admin/workflows/index.html.erb +0 -1
- data/app/views/hyrax/base/_file_manager_actions.html.erb +2 -2
- data/app/views/hyrax/base/_file_manager_member.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_files.html.erb +3 -3
- data/app/views/hyrax/base/_form_member_of_collections.html.erb +1 -2
- data/app/views/hyrax/base/_form_progress.html.erb +3 -3
- data/app/views/hyrax/base/_form_relationships.html.erb +2 -3
- data/app/views/hyrax/base/_form_representative.html.erb +0 -1
- data/app/views/hyrax/base/_form_share.html.erb +1 -3
- data/app/views/hyrax/base/_form_thumbnail.html.erb +0 -1
- data/app/views/hyrax/base/_form_visibility_component.html.erb +6 -6
- data/app/views/hyrax/base/_relationships_parent_rows.html.erb +3 -1
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_share_with.html.erb +3 -3
- data/app/views/hyrax/base/_show_actions.html.erb +14 -1
- data/app/views/hyrax/base/_social_media.html.erb +5 -5
- data/app/views/hyrax/base/_work_title.erb +3 -1
- data/app/views/hyrax/base/_workflow_actions.html.erb +1 -1
- data/app/views/hyrax/base/inspect_work.html.erb +1 -1
- data/app/views/hyrax/base/show.html.erb +2 -2
- data/app/views/hyrax/batch_edits/_check_all.html.erb +2 -2
- data/app/views/hyrax/batch_edits/edit.html.erb +47 -44
- data/app/views/hyrax/batch_select/_add_button.html.erb +2 -2
- data/app/views/hyrax/citations/work.html.erb +3 -3
- data/app/views/hyrax/collections/_collection.html.erb +1 -1
- data/app/views/hyrax/collections/_default_group.html.erb +1 -1
- data/app/views/hyrax/collections/_list_collections.html.erb +2 -2
- data/app/views/hyrax/collections/_list_works.html.erb +1 -1
- data/app/views/hyrax/collections/_show_descriptions.html.erb +6 -6
- data/app/views/hyrax/collections/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/collections/_show_parent_collections.html.erb +11 -38
- data/app/views/hyrax/collections/_sort_and_per_page.html.erb +13 -13
- data/app/views/hyrax/collections/_subcollection_list.html.erb +1 -1
- data/app/views/hyrax/collections/_view_type_group.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +122 -122
- data/app/views/hyrax/content_blocks/_form.html.erb +13 -12
- data/app/views/hyrax/content_blocks/_modal_content_block.html.erb +15 -0
- data/app/views/hyrax/dashboard/_index_partials/_proxy_rights.html.erb +25 -19
- data/app/views/hyrax/dashboard/_sidebar.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_button_for_remove_selected_from_collection.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_collection_title.html.erb +16 -16
- data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -1
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +11 -11
- data/app/views/hyrax/dashboard/collections/_form_default_group_delt.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form_discovery.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +4 -4
- data/app/views/hyrax/dashboard/collections/_form_share.html.erb +51 -44
- data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +4 -4
- data/app/views/hyrax/dashboard/collections/_list_works.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_modal_remove_from_collection.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_modal_remove_sub_collection.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_show_actions.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_show_parent_collections.html.erb +11 -34
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_subcollection_list.html.erb +23 -17
- data/app/views/hyrax/dashboard/collections/show.html.erb +6 -6
- data/app/views/hyrax/dashboard/profiles/_edit_primary.html.erb +0 -4
- data/app/views/hyrax/dashboard/profiles/_trophy_edit.html.erb +16 -14
- data/app/views/hyrax/dashboard/profiles/show.html.erb +6 -0
- data/app/views/hyrax/dashboard/show_admin.html.erb +19 -3
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +6 -0
- data/app/views/hyrax/dashboard/works/_list_works.html.erb +1 -1
- data/app/views/hyrax/depositors/index.html.erb +13 -0
- data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +1 -1
- data/app/views/hyrax/embargoes/edit.html.erb +47 -35
- data/app/views/hyrax/embargoes/index.html.erb +6 -7
- data/app/views/hyrax/file_sets/_actions.html.erb +6 -2
- data/app/views/hyrax/file_sets/_extra_fields_modal.html.erb +3 -3
- data/app/views/hyrax/file_sets/_groups_description.html.erb +0 -1
- data/app/views/hyrax/file_sets/_permission_form.html.erb +3 -3
- data/app/views/hyrax/file_sets/edit.html.erb +24 -20
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +23 -6
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +23 -6
- data/app/views/hyrax/leases/_list_expired_active_leases.html.erb +1 -1
- data/app/views/hyrax/leases/edit.html.erb +47 -35
- data/app/views/hyrax/leases/index.html.erb +6 -6
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -1
- data/app/views/hyrax/my/_facet_limit.html.erb +1 -2
- data/app/views/hyrax/my/_facet_pagination.html.erb +6 -6
- data/app/views/hyrax/my/_facet_pivot.html.erb +1 -1
- data/app/views/hyrax/my/_results_pagination.html.erb +1 -1
- data/app/views/hyrax/my/collections/_facets.html.erb +1 -1
- data/app/views/hyrax/my/collections/_list_collections.html.erb +5 -5
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -2
- data/app/views/hyrax/my/collections/_modal_add_to_collection.html.erb +3 -1
- data/app/views/hyrax/my/collections/_modal_add_to_collection_permission_deny.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +2 -2
- data/app/views/hyrax/my/collections/_modal_delete_collection.html.erb +1 -2
- data/app/views/hyrax/my/collections/_modal_delete_deny.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_delete_selected_collections.html.erb +2 -2
- data/app/views/hyrax/my/collections/_tabs.html.erb +2 -2
- data/app/views/hyrax/my/collections/index.html.erb +7 -3
- data/app/views/hyrax/my/facet.html.erb +1 -1
- data/app/views/hyrax/my/index.html.erb +6 -2
- data/app/views/hyrax/my/works/_facets.html.erb +1 -1
- data/app/views/hyrax/my/works/_list_works.html.erb +1 -1
- data/app/views/hyrax/my/works/_tabs.html.erb +2 -2
- data/app/views/hyrax/my/works/index.html.erb +6 -2
- data/app/views/hyrax/notifications/_notifications.html.erb +1 -1
- data/app/views/hyrax/pages/_form.html.erb +12 -12
- data/app/views/hyrax/pages/show.html.erb +1 -1
- data/app/views/hyrax/single_use_links_viewer/show.html.erb +1 -1
- data/app/views/hyrax/stats/file.html.erb +6 -2
- data/app/views/hyrax/stats/work.html.erb +6 -2
- data/app/views/hyrax/transfers/_received.html.erb +6 -6
- data/app/views/hyrax/transfers/_sent.html.erb +2 -2
- data/app/views/hyrax/transfers/new.html.erb +0 -1
- data/app/views/hyrax/users/_activity_log.html.erb +2 -2
- data/app/views/hyrax/users/_profile_tabs.html.erb +1 -1
- data/app/views/hyrax/users/_search_form.html.erb +1 -1
- data/app/views/hyrax/users/_user.html.erb +0 -1
- data/app/views/hyrax/users/index.html.erb +1 -1
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +1 -2
- data/app/views/layouts/_head_tag_content.html.erb +2 -2
- data/app/views/layouts/error.html.erb +1 -1
- data/app/views/layouts/hyrax.html.erb +6 -3
- data/app/views/layouts/hyrax/dashboard.html.erb +6 -3
- data/app/views/records/show_fields/_based_near.html.erb +0 -1
- data/app/views/records/show_fields/_contributor.html.erb +0 -1
- data/app/views/records/show_fields/_date_created.html.erb +0 -1
- data/app/views/records/show_fields/_description.html.erb +1 -1
- data/app/views/records/show_fields/_identifier.html.erb +0 -1
- data/app/views/records/show_fields/_language.html.erb +0 -1
- data/app/views/records/show_fields/_publisher.html.erb +0 -1
- data/app/views/records/show_fields/_related_url.html.erb +0 -1
- data/app/views/records/show_fields/_resource_type.html.erb +0 -1
- data/app/views/records/show_fields/_subject.html.erb +0 -1
- data/app/views/shared/_citations.html.erb +17 -17
- data/app/views/shared/_select_work_type_modal.html.erb +2 -2
- data/config/locales/hyrax.de.yml +198 -189
- data/config/locales/hyrax.en.yml +21 -14
- data/config/locales/hyrax.es.yml +9 -0
- data/config/locales/hyrax.fr.yml +9 -0
- data/config/locales/hyrax.it.yml +9 -0
- data/config/locales/hyrax.pt-BR.yml +9 -0
- data/config/locales/hyrax.zh.yml +9 -0
- data/config/routes.rb +1 -0
- data/hyrax.gemspec +7 -18
- data/lib/generators/hyrax/models_generator.rb +0 -1
- data/lib/generators/hyrax/templates/db/migrate/20180302200051_add_branding_to_collection_type.rb.erb +5 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +1 -1
- data/lib/hyrax/configuration.rb +2 -4
- data/lib/hyrax/engine.rb +22 -4
- data/lib/hyrax/version.rb +1 -1
- data/spec/actors/hyrax/actors/lease_actor_spec.rb +16 -0
- data/spec/controllers/hyrax/admin/appearances_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/collection_types_controller_spec.rb +2 -0
- data/spec/controllers/hyrax/admin/features_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/workflow_roles_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/workflows_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/batch_edits_controller_spec.rb +14 -1
- data/spec/controllers/hyrax/batch_uploads_controller_spec.rb +2 -2
- data/spec/controllers/hyrax/citations_controller_spec.rb +4 -2
- data/spec/controllers/hyrax/collections_controller_spec.rb +32 -4
- data/spec/controllers/hyrax/content_blocks_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +11 -6
- data/spec/controllers/hyrax/depositors_controller_spec.rb +11 -0
- data/spec/controllers/hyrax/downloads_controller_spec.rb +42 -0
- data/spec/controllers/hyrax/embargoes_controller_spec.rb +40 -1
- data/spec/controllers/hyrax/file_sets_controller_spec.rb +10 -2
- data/spec/controllers/hyrax/generic_works_controller_spec.rb +38 -6
- data/spec/controllers/hyrax/leases_controller_spec.rb +11 -0
- data/spec/controllers/hyrax/my/collections_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/my/works_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/pages_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/stats_controller_spec.rb +2 -0
- data/spec/controllers/hyrax/transfers_controller_spec.rb +1 -1
- data/spec/factories/collection_types.rb +10 -1
- data/spec/factories/collections.rb +5 -3
- data/spec/factories/collections_factory.rb +3 -3
- data/spec/factories/file_sets.rb +2 -6
- data/spec/factories/generic_works.rb +68 -4
- data/spec/factory_tests/collections_factory_spec.rb +2 -1
- data/spec/features/batch_create_spec.rb +60 -0
- data/spec/features/batch_edit_spec.rb +1 -0
- data/spec/features/browse_dashboard_works_spec.rb +1 -0
- data/spec/features/collection_multi_membership_spec.rb +9 -6
- data/spec/features/collection_spec.rb +1 -1
- data/spec/features/collection_type_spec.rb +49 -1
- data/spec/features/create_work_admin_spec.rb +2 -2
- data/spec/features/create_work_spec.rb +1 -0
- data/spec/features/dashboard/all_works.rb +10 -2
- data/spec/features/dashboard/collection_spec.rb +38 -17
- data/spec/features/dashboard/display_admin_dashboard_spec.rb +29 -0
- data/spec/features/dashboard/display_dashboard_spec.rb +1 -1
- data/spec/features/edit_content_block_admin_spec.rb +45 -0
- data/spec/features/edit_work_spec.rb +40 -2
- data/spec/features/ownership_transfer_spec.rb +1 -0
- data/spec/features/proxy_spec.rb +2 -2
- data/spec/features/search_spec.rb +2 -5
- data/spec/features/work_show_spec.rb +14 -4
- data/spec/forms/hyrax/forms/admin/collection_type_form_spec.rb +1 -0
- data/spec/forms/hyrax/forms/collection_form_spec.rb +1 -1
- data/spec/helpers/hyrax/ability_helper_spec.rb +2 -2
- data/spec/helpers/hyrax/collections_helper_spec.rb +12 -4
- data/spec/javascripts/authority_select_spec.js +1 -1
- data/spec/javascripts/settings_spec.js +1 -0
- data/spec/jobs/attach_files_to_work_job_spec.rb +13 -0
- data/spec/jobs/import_url_job_spec.rb +14 -0
- data/spec/models/collection_spec.rb +1 -0
- data/spec/models/concerns/hyrax/collection_nesting_spec.rb +16 -0
- data/spec/models/hyrax/collection_type_spec.rb +1 -0
- data/spec/presenters/hyrax/collection_presenter_spec.rb +1 -100
- data/spec/presenters/hyrax/file_set_presenter_spec.rb +17 -2
- data/spec/presenters/hyrax/menu_presenter_spec.rb +6 -0
- data/spec/presenters/hyrax/work_show_presenter_spec.rb +15 -3
- data/spec/search_builders/hyrax/abstract_type_relation_spec.rb +18 -0
- data/spec/search_builders/hyrax/dashboard/collections_search_builder_spec.rb +30 -19
- data/spec/search_builders/hyrax/parent_collection_search_builder_spec.rb +15 -0
- data/spec/services/hyrax/collection_member_service_spec.rb +10 -19
- data/spec/services/hyrax/collection_types/create_service_spec.rb +35 -2
- data/spec/services/hyrax/collections/collection_member_service_spec.rb +1 -1
- data/spec/services/hyrax/qa_select_service_spec.rb +0 -1
- data/spec/support/selectors.rb +15 -0
- data/spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb +2 -0
- data/spec/views/hyrax/admin/collection_types/_form_settings.html.erb_spec.rb +1 -0
- data/spec/views/hyrax/admin/stats/show.html.erb_spec.rb +9 -0
- data/spec/views/hyrax/base/_attributes.html.erb_spec.rb +1 -1
- data/spec/views/hyrax/base/_relationships.html.erb_spec.rb +13 -1
- data/spec/views/hyrax/base/_show_actions.html.erb_spec.rb +10 -0
- data/spec/views/hyrax/base/show.html.erb_spec.rb +8 -0
- data/spec/views/hyrax/collections/_show_parent_collections.html.erb_spec.rb +3 -53
- data/spec/views/hyrax/dashboard/_sidebar.html.erb_spec.rb +22 -0
- data/spec/views/hyrax/dashboard/collections/_form_share.erb_spec.rb +2 -1
- data/spec/views/hyrax/dashboard/collections/_show_actions.html.erb_spec.rb +13 -0
- data/spec/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb_spec.rb +26 -8
- data/spec/views/hyrax/dashboard/collections/_show_parent_collections.html.erb_spec.rb +7 -43
- data/spec/views/hyrax/dashboard/collections/_subcollection_list.html.erb_spec.rb +13 -1
- data/spec/views/hyrax/dashboard/collections/show.html.erb_spec.rb +1 -0
- data/spec/views/hyrax/dashboard/profiles/_trophy_edit.html.erb_spec.rb +36 -0
- data/spec/views/hyrax/dashboard/profiles/edit.html.erb_spec.rb +0 -38
- data/spec/views/hyrax/dashboard/profiles/show.html.erb_spec.rb +37 -0
- data/spec/views/hyrax/depositors/index.html.erb_spec.rb +13 -0
- data/spec/views/hyrax/file_sets/_actions.html.erb_spec.rb +15 -0
- data/spec/views/hyrax/file_sets/media_display/_audio.html.erb_spec.rb +29 -0
- data/spec/views/hyrax/file_sets/media_display/_default.html.erb_spec.rb +1 -1
- data/spec/views/hyrax/file_sets/media_display/_video.html.erb_spec.rb +29 -0
- data/spec/views/hyrax/my/collections/_list_collections.html.erb_spec.rb +6 -2
- data/tasks/hyrax_dev.rake +1 -3
- data/template.rb +1 -1
- metadata +49 -41
- data/app/assets/javascripts/hyrax/collections_forms.js +0 -108
@@ -1,4 +1,4 @@
|
|
1
|
-
RSpec.describe Hyrax::Collections::CollectionMemberService, clean_repo: true
|
1
|
+
RSpec.describe Hyrax::Collections::CollectionMemberService, clean_repo: true do
|
2
2
|
let(:blacklight_config) { CatalogController.blacklight_config }
|
3
3
|
let(:repository) { Blacklight::Solr::Repository.new(blacklight_config) }
|
4
4
|
let(:current_ability) { instance_double(Ability, admin?: true) }
|
data/spec/support/selectors.rb
CHANGED
@@ -5,6 +5,21 @@ module Selectors
|
|
5
5
|
find '.dropdown-toggle'
|
6
6
|
end
|
7
7
|
end
|
8
|
+
|
9
|
+
# For use with javascript user selector that allows for searching for an existing user
|
10
|
+
# and granting them permission to an object.
|
11
|
+
# @param [User] user to select
|
12
|
+
# @param [String] role granting the user permission (e.g. 'Manager' | 'Depositor' | 'Viewer')
|
13
|
+
def select_user(user, role = 'Depositor')
|
14
|
+
first('a.select2-choice').click
|
15
|
+
find('.select2-input').set(user.user_key)
|
16
|
+
sleep 1
|
17
|
+
first('div.select2-result-label').click
|
18
|
+
within('div.add-users') do
|
19
|
+
select(role)
|
20
|
+
find('input.edit-collection-add-sharing-button').click
|
21
|
+
end
|
22
|
+
end
|
8
23
|
end
|
9
24
|
|
10
25
|
module NewTransfers
|
@@ -1,5 +1,6 @@
|
|
1
1
|
RSpec.describe 'hyrax/admin/admin_sets/_show_document_list_row.html.erb', type: :view do
|
2
2
|
let(:user) { create(:user, groups: 'admin') }
|
3
|
+
let(:ability) { Ability.new(user) }
|
3
4
|
|
4
5
|
let(:work) do
|
5
6
|
create(:work, user: user, creator: ["ggm"], title: ['One Hundred Years of Solitude'])
|
@@ -7,6 +8,7 @@ RSpec.describe 'hyrax/admin/admin_sets/_show_document_list_row.html.erb', type:
|
|
7
8
|
|
8
9
|
before do
|
9
10
|
view.blacklight_config = Blacklight::Configuration.new
|
11
|
+
allow(controller).to receive(:current_ability).and_return(ability)
|
10
12
|
allow(view).to receive(:current_user).and_return(user)
|
11
13
|
allow(work).to receive(:title_or_label).and_return("One Hundred Years of Solitude")
|
12
14
|
allow(work).to receive(:edit_groups).and_return([user])
|
@@ -10,6 +10,15 @@ RSpec.describe "hyrax/admin/stats/show.html.erb", type: :view do
|
|
10
10
|
allow(presenter).to receive(:depositors).and_return([])
|
11
11
|
end
|
12
12
|
|
13
|
+
context 'locales' do
|
14
|
+
before do
|
15
|
+
render
|
16
|
+
end
|
17
|
+
it 'includes a default locale hidden input' do
|
18
|
+
expect(rendered).to have_selector 'input', exact: 'en'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
13
22
|
context "default depositors" do
|
14
23
|
let(:top_5_active_users) do
|
15
24
|
(1..5).map { |i| double(label: i.to_s, value: i) }
|
@@ -1,5 +1,6 @@
|
|
1
1
|
RSpec.describe 'hyrax/base/relationships', type: :view do
|
2
|
-
let(:
|
2
|
+
let(:user) { create(:user, groups: 'admin') }
|
3
|
+
let(:ability) { Ability.new(user) }
|
3
4
|
let(:solr_doc) { instance_double(SolrDocument, id: '123', human_readable_type: 'Work', admin_set: nil) }
|
4
5
|
let(:presenter) { Hyrax::WorkShowPresenter.new(solr_doc, ability) }
|
5
6
|
let(:generic_work) do
|
@@ -29,6 +30,7 @@ RSpec.describe 'hyrax/base/relationships', type: :view do
|
|
29
30
|
let(:member_of_collection_presenters) { [collection] }
|
30
31
|
|
31
32
|
before do
|
33
|
+
allow(controller).to receive(:current_user).and_return user
|
32
34
|
allow(view).to receive(:contextual_path).and_return("/collections/456")
|
33
35
|
allow(presenter).to receive(:member_of_collection_presenters).and_return(member_of_collection_presenters)
|
34
36
|
render 'hyrax/base/relationships', presenter: presenter
|
@@ -44,6 +46,7 @@ RSpec.describe 'hyrax/base/relationships', type: :view do
|
|
44
46
|
let(:member_of_collection_presenters) { [generic_work] }
|
45
47
|
|
46
48
|
before do
|
49
|
+
allow(controller).to receive(:current_user).and_return user
|
47
50
|
allow(view).to receive(:contextual_path).and_return("/concern/generic_works/456")
|
48
51
|
allow(presenter).to receive(:member_of_collection_presenters).and_return(member_of_collection_presenters)
|
49
52
|
render 'hyrax/base/relationships', presenter: presenter
|
@@ -59,6 +62,7 @@ RSpec.describe 'hyrax/base/relationships', type: :view do
|
|
59
62
|
let(:member_of_collection_presenters) { [generic_work, collection] }
|
60
63
|
|
61
64
|
before do
|
65
|
+
allow(controller).to receive(:current_user).and_return user
|
62
66
|
allow(view).to receive(:contextual_path).and_return("/concern/generic_works/456")
|
63
67
|
allow(presenter).to receive(:member_of_collection_presenters).and_return(member_of_collection_presenters)
|
64
68
|
render 'hyrax/base/relationships', presenter: presenter
|
@@ -71,9 +75,17 @@ RSpec.describe 'hyrax/base/relationships', type: :view do
|
|
71
75
|
|
72
76
|
context "with admin sets" do
|
73
77
|
it "renders using attribute_to_html" do
|
78
|
+
allow(controller).to receive(:current_user).and_return(user)
|
74
79
|
allow(solr_doc).to receive(:member_of_collection_ids).and_return([])
|
75
80
|
expect(presenter).to receive(:attribute_to_html).with(:admin_set, render_as: :faceted)
|
76
81
|
render 'hyrax/base/relationships', presenter: presenter
|
77
82
|
end
|
83
|
+
|
84
|
+
it "skips admin sets if user not logged in" do
|
85
|
+
allow(controller).to receive(:current_user).and_return(nil)
|
86
|
+
allow(solr_doc).to receive(:member_of_collection_ids).and_return([])
|
87
|
+
expect(presenter).not_to receive(:attribute_to_html).with(:admin_set, render_as: :faceted)
|
88
|
+
render 'hyrax/base/relationships', presenter: presenter
|
89
|
+
end
|
78
90
|
end
|
79
91
|
end
|
@@ -62,5 +62,15 @@ RSpec.describe 'hyrax/base/_show_actions.html.erb', type: :view do
|
|
62
62
|
expect(rendered).to have_link 'File Manager'
|
63
63
|
end
|
64
64
|
end
|
65
|
+
|
66
|
+
context "when there are valid_child_concerns" do
|
67
|
+
before do
|
68
|
+
allow(presenter).to receive(:member_presenters).and_return([])
|
69
|
+
render 'hyrax/base/show_actions.html.erb', presenter: presenter
|
70
|
+
end
|
71
|
+
it "creates a link to add child work" do
|
72
|
+
expect(rendered).to have_link 'Attach Generic Work', href: "/concern/parent/#{presenter.id}/generic_works/new"
|
73
|
+
end
|
74
|
+
end
|
65
75
|
end
|
66
76
|
end
|
@@ -47,6 +47,7 @@ RSpec.describe 'hyrax/base/show.html.erb', type: :view do
|
|
47
47
|
allow(presenter).to receive(:representative_presenter).and_return(representative_presenter)
|
48
48
|
allow(presenter).to receive(:representative_id).and_return('123')
|
49
49
|
allow(presenter).to receive(:tweeter).and_return("@#{depositor.twitter_handle}")
|
50
|
+
allow(presenter).to receive(:human_readable_type).and_return("Work")
|
50
51
|
allow(controller).to receive(:current_user).and_return(depositor)
|
51
52
|
allow(User).to receive(:find_by_user_key).and_return(depositor.user_key)
|
52
53
|
allow(view).to receive(:blacklight_config).and_return(Blacklight::Configuration.new)
|
@@ -91,6 +92,13 @@ RSpec.describe 'hyrax/base/show.html.erb', type: :view do
|
|
91
92
|
end
|
92
93
|
end
|
93
94
|
|
95
|
+
describe 'head tag page title' do
|
96
|
+
it 'appears in head tags' do
|
97
|
+
head_tag = Nokogiri::HTML(rendered).xpath("//head/title")
|
98
|
+
expect(head_tag.text).to eq("Work | My Title | ID: 999 | Hyrax")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
94
102
|
describe 'google scholar' do
|
95
103
|
it 'appears in meta tags' do
|
96
104
|
gscholar_meta_tags = Nokogiri::HTML(rendered).xpath("//meta[contains(@name, 'citation_')]")
|
@@ -55,27 +55,7 @@ RSpec.describe 'hyrax/collections/_show_parent_collections.html.erb', type: :vie
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
context 'when parent collection list is not empty
|
59
|
-
let(:parent_docs) { [collection1, collection2, collection3] }
|
60
|
-
|
61
|
-
it "posts the collection's title with a link to the collection" do
|
62
|
-
subject
|
63
|
-
expect(rendered).to have_link(collection1.title.first, visible: true)
|
64
|
-
expect(rendered).to have_link(collection2.title.first, visible: true)
|
65
|
-
expect(rendered).to have_link(collection3.title.first, visible: true)
|
66
|
-
expect(rendered).not_to have_button('show more...')
|
67
|
-
end
|
68
|
-
|
69
|
-
xit 'includes a count of the parent collections' do
|
70
|
-
# TODO: add test when actual count is added to page
|
71
|
-
end
|
72
|
-
|
73
|
-
it 'does not render pagination' do
|
74
|
-
expect(subject).not_to render_template("hyrax/collections/_paginate")
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
context 'when parent collection list exceeds parents_to_show' do
|
58
|
+
context 'when parent collection list is not empty' do
|
79
59
|
let(:parent_docs) { [collection1, collection2, collection3, collection4, collection5] }
|
80
60
|
|
81
61
|
it "posts the collection's title with a link to the collection" do
|
@@ -83,38 +63,8 @@ RSpec.describe 'hyrax/collections/_show_parent_collections.html.erb', type: :vie
|
|
83
63
|
expect(rendered).to have_link(collection1.title.first, visible: true)
|
84
64
|
expect(rendered).to have_link(collection2.title.first, visible: true)
|
85
65
|
expect(rendered).to have_link(collection3.title.first, visible: true)
|
86
|
-
expect(rendered).to have_link(collection4.title.first, visible:
|
87
|
-
expect(rendered).to have_link(collection5.title.first, visible:
|
88
|
-
expect(rendered).to have_button('show more...', visible: true)
|
89
|
-
expect(rendered).to have_button('...show less', visible: false)
|
90
|
-
end
|
91
|
-
|
92
|
-
it 'renders pagination' do
|
93
|
-
expect(subject).not_to render_template("hyrax/collections/_paginate")
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
context 'when parent collection list has multiple pages' do
|
98
|
-
let(:parent_docs) { [collection1, collection2, collection3, collection4, collection5] }
|
99
|
-
let(:parent_collections) { double(Object, documents: parent_docs, response: { "numFound" => parent_docs.size }, total_pages: 2) }
|
100
|
-
|
101
|
-
before do
|
102
|
-
stub_template "hyrax/collections/_paginate" => "paginate"
|
103
|
-
end
|
104
|
-
|
105
|
-
it "renders a link to all collections" do
|
106
|
-
subject
|
107
|
-
expect(rendered).to have_link(collection1.title.first, visible: true)
|
108
|
-
expect(rendered).to have_link(collection2.title.first, visible: true)
|
109
|
-
expect(rendered).to have_link(collection3.title.first, visible: true)
|
110
|
-
expect(rendered).to have_link(collection4.title.first, visible: false)
|
111
|
-
expect(rendered).to have_link(collection5.title.first, visible: false)
|
112
|
-
end
|
113
|
-
|
114
|
-
it "does not render the more/less buttons" do
|
115
|
-
subject
|
116
|
-
expect(rendered).not_to have_button('show more...', visible: true)
|
117
|
-
expect(rendered).not_to have_button('...show less', visible: false)
|
66
|
+
expect(rendered).to have_link(collection4.title.first, visible: true)
|
67
|
+
expect(rendered).to have_link(collection5.title.first, visible: true)
|
118
68
|
end
|
119
69
|
|
120
70
|
it 'renders pagination' do
|
@@ -107,4 +107,26 @@ RSpec.describe 'hyrax/dashboard/_sidebar.html.erb', type: :view do
|
|
107
107
|
it { is_expected.to have_content t('hyrax.admin.sidebar.configuration') }
|
108
108
|
it { is_expected.to have_link t('hyrax.admin.sidebar.collection_types') }
|
109
109
|
end
|
110
|
+
|
111
|
+
context 'when proxy deposits are enabled' do
|
112
|
+
before do
|
113
|
+
allow(Flipflop).to receive(:proxy_deposit?).and_return(true)
|
114
|
+
render
|
115
|
+
end
|
116
|
+
|
117
|
+
subject { rendered }
|
118
|
+
|
119
|
+
it { is_expected.to have_link t('hyrax.dashboard.manage_proxies') }
|
120
|
+
end
|
121
|
+
|
122
|
+
context 'when proxy deposits are disabled' do
|
123
|
+
before do
|
124
|
+
allow(Flipflop).to receive(:proxy_deposit?).and_return(false)
|
125
|
+
render
|
126
|
+
end
|
127
|
+
|
128
|
+
subject { rendered }
|
129
|
+
|
130
|
+
it { is_expected.not_to have_link t('hyrax.dashboard.manage_proxies') }
|
131
|
+
end
|
110
132
|
end
|
@@ -12,7 +12,8 @@ RSpec.describe 'hyrax/dashboard/collections/_form_share.html.erb', type: :view d
|
|
12
12
|
assign(:collection, collection)
|
13
13
|
@form = instance_double(Hyrax::Forms::CollectionForm,
|
14
14
|
to_model: collection,
|
15
|
-
permission_template: pt_form
|
15
|
+
permission_template: pt_form,
|
16
|
+
id: '1234xyz')
|
16
17
|
render
|
17
18
|
end
|
18
19
|
it "has the required selectors" do
|
@@ -35,10 +35,23 @@ RSpec.describe 'hyrax/dashboard/collections/_show_actions.html.erb', type: :view
|
|
35
35
|
context 'with nestable collection' do
|
36
36
|
it 'renders add parent collection link' do
|
37
37
|
allow(presenter).to receive(:collection_type_is_nestable?).and_return true
|
38
|
+
allow(presenter).to receive(:user_can_nest_collection?).and_return true
|
39
|
+
|
38
40
|
render
|
39
41
|
expect(rendered).to have_button('Add existing collections to this collection')
|
40
42
|
end
|
41
43
|
end
|
44
|
+
|
45
|
+
context 'with nestable collection but without permissions' do
|
46
|
+
it 'does not render add parent collection link' do
|
47
|
+
allow(presenter).to receive(:collection_type_is_nestable?).and_return true
|
48
|
+
allow(presenter).to receive(:user_can_nest_collection?).and_return false
|
49
|
+
|
50
|
+
render
|
51
|
+
expect(rendered).not_to have_button('Add existing collections to this collection')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
42
55
|
context 'with non-nestable collection' do
|
43
56
|
it 'does not render add parent collection link' do
|
44
57
|
render
|
@@ -9,15 +9,33 @@ RSpec.describe 'hyrax/dashboard/collections/_show_parent_collection_row.html.erb
|
|
9
9
|
let(:document) { SolrDocument.new(parent_collection_doc) }
|
10
10
|
let(:subject) { render('show_parent_collection_row.html.erb', id: child_collection.id, document: document) }
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
context 'when user can edit the parent collection' do
|
13
|
+
before do
|
14
|
+
allow(view).to receive(:can?).with(:edit, document.id).and_return(true)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'shows link to collection title and active remove button' do
|
18
|
+
subject
|
19
|
+
expect(rendered).to have_link(document.title.first)
|
20
|
+
expect(rendered).to have_button("Remove")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "renders the proper data attributes on list element" do
|
24
|
+
expect(subject).to have_selector(:css, 'li[data-post-url="/dashboard/collections/123/remove_parent/999"]')
|
25
|
+
expect(subject).to have_selector(:css, 'li[data-id="123"]')
|
26
|
+
expect(subject).to have_selector(:css, 'li[data-parent-id="999"]')
|
27
|
+
end
|
15
28
|
end
|
16
29
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
30
|
+
context 'disable button if no edit permission' do
|
31
|
+
before do
|
32
|
+
allow(view).to receive(:can?).with(:edit, document.id).and_return(false)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'shows link to collection title and disabled remove button' do
|
36
|
+
subject
|
37
|
+
expect(rendered).to have_link(document.title.first)
|
38
|
+
expect(rendered).to have_button("Remove", disabled: true)
|
39
|
+
end
|
22
40
|
end
|
23
41
|
end
|
@@ -58,61 +58,25 @@ RSpec.describe 'hyrax/dashboard/collections/_show_parent_collections.html.erb',
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
context 'when parent collection list is not empty
|
62
|
-
let(:parent_docs) { [collection1, collection2, collection3] }
|
63
|
-
|
64
|
-
it "posts the collection's title with a link to the collection" do
|
65
|
-
assign(:events, parent_docs)
|
66
|
-
subject
|
67
|
-
|
68
|
-
expect(subject).to render_template("_show_parent_collection_row")
|
69
|
-
expect(view).to render_template(partial: "_show_parent_collection_row", count: 3)
|
70
|
-
expect(rendered).not_to have_button('show more...')
|
71
|
-
end
|
61
|
+
context 'when parent collection list is not empty' do
|
62
|
+
let(:parent_docs) { [collection1, collection2, collection3, collection4, collection5] }
|
72
63
|
|
73
|
-
|
74
|
-
|
64
|
+
before do
|
65
|
+
stub_template "_modal_remove_from_collection.html.erb" => 'modal'
|
75
66
|
end
|
76
|
-
end
|
77
|
-
|
78
|
-
context 'when parent collection list exceeds parents_to_show' do
|
79
|
-
let(:parent_docs) { [collection1, collection2, collection3, collection4, collection5] }
|
80
67
|
|
81
68
|
it "posts the collection's title with a link to the collection" do
|
82
69
|
assign(:events, parent_docs)
|
83
70
|
subject
|
84
71
|
expect(view).to render_template(partial: "_show_parent_collection_row", count: 5)
|
85
|
-
expect(rendered).to have_button('show more...', visible: true)
|
86
|
-
expect(rendered).to have_button('...show less', visible: false)
|
87
72
|
end
|
88
73
|
|
89
74
|
it 'renders pagination' do
|
90
|
-
expect(subject).
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
context 'when parent collection list has multiple pages' do
|
95
|
-
let(:parent_docs) { [collection1, collection2, collection3, collection4, collection5] }
|
96
|
-
let(:parent_collections) { double(Object, documents: parent_docs, response: { "numFound" => parent_docs.size }, total_pages: 2) }
|
97
|
-
|
98
|
-
before do
|
99
|
-
stub_template "hyrax/collections/_paginate.html.erb" => "paginate"
|
100
|
-
assign(:events, parent_docs)
|
101
|
-
end
|
102
|
-
|
103
|
-
it "renders a row for each collection" do
|
104
|
-
subject
|
105
|
-
expect(view).to render_template(partial: "_show_parent_collection_row", count: 5)
|
106
|
-
end
|
107
|
-
|
108
|
-
it "does not render the more/less buttons" do
|
109
|
-
subject
|
110
|
-
expect(rendered).not_to have_button('show more...', visible: true)
|
111
|
-
expect(rendered).not_to have_button('...show less', visible: false)
|
75
|
+
expect(subject).to render_template("hyrax/collections/_paginate")
|
112
76
|
end
|
113
77
|
|
114
|
-
it 'renders
|
115
|
-
expect(subject).to render_template("
|
78
|
+
it 'renders the remove from list modal' do
|
79
|
+
expect(subject).to render_template("_modal_remove_from_collection")
|
116
80
|
end
|
117
81
|
end
|
118
82
|
end
|
@@ -1,7 +1,15 @@
|
|
1
1
|
RSpec.describe 'hyrax/dashboard/collections/_subcollection_list.html.erb', type: :view do
|
2
|
+
let(:user) { create :user }
|
3
|
+
let(:ability) { instance_double("Ability") }
|
2
4
|
let(:collection) { build(:named_collection, id: '123') }
|
3
5
|
let(:subject) { render('subcollection_list.html.erb', id: collection.id, collection: subcollection) }
|
4
6
|
|
7
|
+
before do
|
8
|
+
allow(view).to receive(:id).and_return(collection.id)
|
9
|
+
allow(view).to receive(:current_ability).and_return(ability)
|
10
|
+
allow(controller).to receive(:can?).with(:edit, collection.id).and_return true
|
11
|
+
end
|
12
|
+
|
5
13
|
context 'when subcollection list is empty' do
|
6
14
|
let(:subcollection) { nil }
|
7
15
|
|
@@ -19,7 +27,6 @@ RSpec.describe 'hyrax/dashboard/collections/_subcollection_list.html.erb', type:
|
|
19
27
|
let(:subcollection) { [collection] }
|
20
28
|
|
21
29
|
before do
|
22
|
-
stub_template '_modal_remove_sub_collection.html.erb' => 'Remove button'
|
23
30
|
assign(:subcollection_docs, subcollection)
|
24
31
|
assign(:document, collection)
|
25
32
|
allow(collection).to receive(:title_or_label).and_return(collection.title)
|
@@ -39,6 +46,11 @@ RSpec.describe 'hyrax/dashboard/collections/_subcollection_list.html.erb', type:
|
|
39
46
|
expect(subject).to render_template('_modal_remove_sub_collection')
|
40
47
|
end
|
41
48
|
|
49
|
+
it "renders the proper data attributes on list element" do
|
50
|
+
expect(subject).to have_selector(:css, 'li[data-post-url="/dashboard/collections/123/remove_child/123"]')
|
51
|
+
expect(subject).to have_selector(:css, 'li[data-id="123"]')
|
52
|
+
end
|
53
|
+
|
42
54
|
it 'renders pagination' do
|
43
55
|
expect(subject).to render_template("hyrax/collections/_paginate")
|
44
56
|
end
|