Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (11 sloc) 0.491 kB
-module(yz_json_extractor_with_suffix_tests).
-include_lib("eunit/include/eunit.hrl").
json_extract_test() ->
%% Actual
{ok, TestJSON} = file:read_file("../test/with_suffix.json"),
Fields = yz_json_extractor_with_suffix:extract(TestJSON),
Xml = yz_solr:prepare_xml([{doc, Fields}]),
%% Expected
{ok, TestXML} = file:read_file("../test/with_suffix.xml"),
Xml1 = binary:replace(TestXML, <<"\n">>, <<"">>, [global]),
?assertEqual(Xml1, iolist_to_binary(Xml)).
Jump to Line
Something went wrong with that request. Please try again.