Skip to content

Commit

Permalink
Merge pull request #824 from alphagov/remove-nav-helper-stubbing
Browse files Browse the repository at this point in the history
Update nav helpers to 9.1.0
  • Loading branch information
tijmenb committed Mar 14, 2018
2 parents 3bda9b4 + 72b557f commit ee6fe91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gem 'gds-api-adapters', '~> 51.4'
gem 'govuk_ab_testing', '~> 2.4'
gem 'govuk_app_config', '~> 1.3'
gem 'govuk_frontend_toolkit', '~> 7.4'
gem 'govuk_navigation_helpers', '~> 9.0'
gem 'govuk_navigation_helpers', '~> 9.1.0'
gem 'govuk_publishing_components', '~> 5.4.0'
gem 'plek', '~> 2.1'
gem 'slimmer', '~> 12.0'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ GEM
govuk_frontend_toolkit (7.4.2)
railties (>= 3.1.0)
sass (>= 3.2.0)
govuk_navigation_helpers (9.0.0)
govuk_navigation_helpers (9.1.0)
activesupport (~> 5.1)
gds-api-adapters (>= 43.0)
govuk_ab_testing (~> 2.4)
Expand Down Expand Up @@ -360,7 +360,7 @@ DEPENDENCIES
govuk_ab_testing (~> 2.4)
govuk_app_config (~> 1.3)
govuk_frontend_toolkit (~> 7.4)
govuk_navigation_helpers (~> 9.0)
govuk_navigation_helpers (~> 9.1.0)
govuk_publishing_components (~> 5.4.0)
govuk_schemas (~> 3.1)
htmlentities (~> 4.3)
Expand Down
28 changes: 0 additions & 28 deletions test/controllers/content_items_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,34 +290,6 @@ class ContentItemsControllerTest < ActionController::TestCase
refute_match(/A Taxon/, taxonomy_sidebar)
end

test "shows the taxonomy-navigation if tagged to taxonomy" do
GovukNavigationHelpers::ContentItem
.stubs(:whitelisted_root_taxon_content_ids)
.returns(["aaaa-bbbb"])

content_item = content_store_has_schema_example("document_collection", "document_collection")
path = "government/abtest/document_collection"
content_item['base_path'] = "/#{path}"
content_item['links'] = {
'taxons' => [
{
'title' => 'A Taxon',
'base_path' => '/a-taxon',
'content_id' => 'aaaa-bbbb',
}
]
}

# GovukNavigationHelpers::NavigationHelper.taxonomy_sidebar makes requests
# to Rummager for related content for given taxons
stub_any_rummager_search

content_store_has_item(content_item['base_path'], content_item)

get :show, params: { path: path_for(content_item) }
assert_match(/A Taxon/, taxonomy_sidebar)
end

test "Case Studies don't have the taxonomy-navigation" do
content_item = content_store_has_schema_example('case_study', 'case_study')
path = 'government/test/case-study'
Expand Down

0 comments on commit ee6fe91

Please sign in to comment.