Permalink
Browse files

Merge pull request #8 from alphagov/remove-additional-links

Remove dead 'additional links' code
  • Loading branch information...
2 parents cfde180 + db28367 commit 9a0eb9eebe07c48953c589019655b1f183c7c2dc @fatbusinessman fatbusinessman committed Mar 18, 2013
Showing with 3 additions and 24 deletions.
  1. +1 −3 lib/rummageable.rb
  2. +2 −21 test/rummageable_test.rb
View
@@ -63,9 +63,7 @@ def commit(index_name = default_index)
%w[link],
%w[indexable_content],
%w[boost_phrases],
- %w[additional_links title],
- %w[additional_links link],
- %w[additional_links link_order],
+ %w[link_order],
]
def validate_structure(hash, parents=[])
View
@@ -16,11 +16,7 @@ def test_should_index_a_single_document_by_posting_it_as_json
"subsubsection" => "NAME OF SUBSUBSECTION",
"link" => "/link",
"indexable_content" => "TEXT",
- "boost_phrases" => "BOOST",
- "additional_links" => [
- {"title" => "LINK1", "link" => "/link1"},
- {"title" => "LINK2", "link" => "/link2"},
- ]
+ "boost_phrases" => "BOOST"
}
json = MultiJson.encode([document])
@@ -70,17 +66,6 @@ def test_should_raise_an_exception_if_a_document_has_unrecognised_keys
end
end
- def test_should_raise_an_exception_if_a_document_has_unrecognised_nested_keys
- document = {
- "additional_links" => [
- {"foo" => "bar"}
- ]
- }
- assert_raises Rummageable::InvalidDocument do
- Rummageable.index(document)
- end
- end
-
def test_allows_indexing_to_an_alternative_index
document = {
"title" => "TITLE",
@@ -90,11 +75,7 @@ def test_allows_indexing_to_an_alternative_index
"subsection" => "NAME OF SUBSECTION",
"link" => "/link",
"indexable_content" => "TEXT",
- "boost_phrases" => "BOOST",
- "additional_links" => [
- {"title" => "LINK1", "link" => "/link1"},
- {"title" => "LINK2", "link" => "/link2"},
- ]
+ "boost_phrases" => "BOOST"
}
json = MultiJson.encode([document])

0 comments on commit 9a0eb9e

Please sign in to comment.