Skip to content

Commit

Permalink
Fixes facets in set pages.
Browse files Browse the repository at this point in the history
Closes #465. Closes #465
  • Loading branch information
Trey Terrell committed Jun 3, 2014
1 parent bb68ec1 commit baf1340
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/helpers/collections_helper.rb
Expand Up @@ -70,7 +70,12 @@ def link_to_next_document(next_document)
# TODO: Improve me.
def catalog_index_path(*args)
if params[:controller] == "sets"
return sets_path(*(args << {:set => params[:set]}))
if args.last.kind_of?(Hash)
args.last.merge!({:set => params[:set]})
else
args << {:set => params[:set]}
end
return sets_path(*(args))
end
super
end
Expand Down
10 changes: 10 additions & 0 deletions spec/features/sets_spec.rb
Expand Up @@ -113,6 +113,16 @@
expect(page).to have_content("Oregon State University")
end
end
context "and a facet is clicked" do
before do
click_link "Test Facet"
end
it "should stay in set context" do
within("#footer .contact") do
expect(page).to have_content("Oregon State University")
end
end
end
context "and start over is clicked", :js => true do
before do
find("#startOverLink").click
Expand Down

0 comments on commit baf1340

Please sign in to comment.