Skip to content

Commit

Permalink
Merge pull request #2404 from projectblacklight/2391-bookmark-actions…
Browse files Browse the repository at this point in the history
…-docs

Include all bookmarked documents in the bookmark document actions results
  • Loading branch information
mejackreed authored Jan 14, 2021
2 parents 7fe09d8 + 5339731 commit 7ea2667
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/controllers/concerns/blacklight/bookmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Blacklight::Bookmarks
def action_documents
bookmarks = token_or_current_or_guest_user.bookmarks
bookmark_ids = bookmarks.collect { |b| b.document_id.to_s }
search_service.fetch(bookmark_ids)
search_service.fetch(bookmark_ids, rows: bookmark_ids.count)
end

def action_success_redirect_path
Expand Down
10 changes: 1 addition & 9 deletions spec/features/bookmarks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
expect(page).to have_content 'Strong Medicine speaks'
end

it "cites items in current bookmarks page" do
it "cites all items in current bookmarks" do
visit solr_document_path('2009373513') # Ci an zhou bian
click_button 'Bookmark'

Expand All @@ -70,14 +70,6 @@

click_link 'Cite'
expect(page).to have_content 'Strong Medicine speaks'
expect(page).not_to have_content 'Ci an zhou bian'

visit "/bookmarks?per_page=1"
click_link "2"
expect(page).to have_content 'Ci an zhou bian'

click_link 'Cite'
expect(page).not_to have_content 'Strong Medicine speaks'
expect(page).to have_content 'Ci an zhou bian'
end
end

0 comments on commit 7ea2667

Please sign in to comment.