Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Created August 29, 2017 16:48
Show Gist options
  • Save jcoyne/5b97f1fd186f998ada16229a44ecffee to your computer and use it in GitHub Desktop.
Save jcoyne/5b97f1fd186f998ada16229a44ecffee to your computer and use it in GitHub Desktop.
1) Blacklight::ShowPresenter#html_title with an html_title_field passes the no_html option to the FieldPresenter
Failure/Error: FieldPresenter.new(view_context, document, field_config, options).render
#<Blacklight::FieldPresenter (class)> received :new with unexpected arguments
expected: (#<Double (anonymous)>, #<SolrDocument:0x007ffa0239af18 @_source={"id"=>1, "link_to_facet_true"=>"x", "link_to_facet_named"=>...8915446827338632>}, :dc_xml=>{:content_type=>"text/xml"}, :oai_dc_xml=>{:content_type=>"text/xml"}}>, an_instance_of(Blacklight::Configuration::NullField), {:no_html=>true})
got: (#<Double (anonymous)>, #<SolrDocument:0x007ffa0239af18 @_source={"id"=>1, "link_to_facet_true"=>"x", "link_to_facet_named"=>...8915446827338632>}, :dc_xml=>{:content_type=>"text/xml"}, :oai_dc_xml=>{:content_type=>"text/xml"}}>, #<Blacklight::Configuration::NullField field="id">, {:no_html=>true})
Diff:
@@ -1,5 +1,5 @@
[#<Double (anonymous)>,
#<SolrDocument:0x007ffa0239af18 @_source={"id"=>1, "link_to_facet_true"=>"x", "link_to_facet_named"=>"x", "qwer"=>"document qwer value", "mnbv"=>"document mnbv value"}, @response=nil, @export_formats={:xml=>{:content_type=>#<Mime::Type:0x007ff9fbb0b678 @synonyms=["text/xml", "application/x-xml"], @symbol=:xml, @string="application/xml", @hash=-788915446827338632>}, :dc_xml=>{:content_type=>"text/xml"}, :oai_dc_xml=>{:content_type=>"text/xml"}}>,
- "an_instance_of(Blacklight::Configuration::NullField)",
+ #<Blacklight::Configuration::NullField field="id">,
{:no_html=>true}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment