@@ -57,40 +57,24 @@ def app
5757 expect ( first_document ) . to_not have_key ( "raw_content" )
5858 expect ( first_document ) . to_not have_key ( "content" )
5959 end
60- end
61-
62- context "document index" do
63- it "returns collection documents" do
64- get "/collections/posts/documents"
65- expect ( last_response ) . to be_ok
66- expect ( first_response [ "title" ] ) . to eq ( "Test" )
67- end
6860
6961 it "includes front matter defaults" do
70- get "/collections/posts/documents "
62+ get "/collections/posts"
7163 expect ( last_response ) . to be_ok
72- expect ( first_response . key? ( "some_front_matter" ) ) . to eq ( true )
64+ expect ( first_document . key? ( "some_front_matter" ) ) . to eq ( true )
7365 end
7466
7567 it "doesn't include the raw front matter" do
76- get "/collections/posts/documents"
77- expect ( last_response ) . to be_ok
78- expect ( first_response ) . to_not have_key ( "front_matter" )
79- end
80-
81- it "doesn't include content in the index" do
82- get "/collections/posts/documents"
68+ get "/collections/posts"
8369 expect ( last_response ) . to be_ok
84- expect ( first_response ) . to_not have_key ( "content" )
85- expect ( first_response ) . to_not have_key ( "raw_content" )
86- expect ( first_response ) . to_not have_key ( "output" )
70+ expect ( first_document ) . to_not have_key ( "front_matter" )
8771 end
8872
89- it "doesn't include next/previous in the index " do
90- get "/collections/posts/documents "
73+ it "doesn't include next/previous" do
74+ get "/collections/posts"
9175 expect ( last_response ) . to be_ok
92- expect ( first_response ) . to_not have_key ( "next" )
93- expect ( first_response ) . to_not have_key ( "previous" )
76+ expect ( first_document ) . to_not have_key ( "next" )
77+ expect ( first_document ) . to_not have_key ( "previous" )
9478 end
9579 end
9680
0 commit comments