diff --git a/lib/alchemy-pg_search.rb b/lib/alchemy-pg_search.rb index 960c7a9..547577e 100644 --- a/lib/alchemy-pg_search.rb +++ b/lib/alchemy-pg_search.rb @@ -6,7 +6,7 @@ module Alchemy @@search_class = PgSearch module PgSearch - SEARCHABLE_INGREDIENTS = %w[Text Richtext Picture] + SEARCHABLE_INGREDIENTS = %w[Text Richtext Headline Picture] extend Config diff --git a/spec/models/ingredient_spec.rb b/spec/models/ingredient_spec.rb index eef4dad..7d37fec 100644 --- a/spec/models/ingredient_spec.rb +++ b/spec/models/ingredient_spec.rb @@ -72,6 +72,13 @@ it_behaves_like "a searchable content" end + describe Alchemy::Ingredients::Headline do + let(:ingredient) { create(:alchemy_ingredient_headline, value: "foo bar", element: element) } + + it_behaves_like "it is searchable" + it_behaves_like "a searchable content" + end + describe Alchemy::Ingredients::Picture do let(:ingredient) { create(:alchemy_ingredient_picture, value: create(:alchemy_picture), caption: content, element: element) }