Skip to content

Commit

Permalink
Allow navigating to page 1 on search results (#151)
Browse files Browse the repository at this point in the history
fixes #148

Co-authored-by: Anna Headley <hackartisan@users.noreply.github.com>
  • Loading branch information
leefaisonr and hackartisan committed Sep 27, 2023
1 parent fbb64a4 commit b64f0cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/kaminari_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
# config.page_method_name = :page
# config.param_name = :page
# config.max_pages = nil
# config.params_on_first_page = false
config.params_on_first_page = true
end
8 changes: 8 additions & 0 deletions spec/system/search_feature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,13 @@
click_on 'Go'
expect(page).to have_link('* Aaron')
end
it 'allows navigation back to page 1' do
visit '/'
fill_in 'search_term', with: 'Aaron'
click_on 'Go'
expect(page).to have_link('* Aaron')
click_on '1'
expect(page).to have_link('AALAS')
end
end
end

0 comments on commit b64f0cf

Please sign in to comment.