@@ -57,40 +57,24 @@ def app
57
57
expect ( first_document ) . to_not have_key ( "raw_content" )
58
58
expect ( first_document ) . to_not have_key ( "content" )
59
59
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
68
60
69
61
it "includes front matter defaults" do
70
- get "/collections/posts/documents "
62
+ get "/collections/posts"
71
63
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 )
73
65
end
74
66
75
67
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"
83
69
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" )
87
71
end
88
72
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"
91
75
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" )
94
78
end
95
79
end
96
80
0 commit comments