Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Merge pull request #8 from alphagov/remove-additional-links
Browse files Browse the repository at this point in the history
Remove dead 'additional links' code
  • Loading branch information
dhwthompson committed Mar 18, 2013
2 parents cfde180 + db28367 commit 9a0eb9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
4 changes: 1 addition & 3 deletions lib/rummageable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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=[])
Expand Down
23 changes: 2 additions & 21 deletions test/rummageable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down Expand Up @@ -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",
Expand All @@ -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])

Expand Down

0 comments on commit 9a0eb9e

Please sign in to comment.