forked from jekyll/jekyll-admin
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdashboard_spec.rb
26 lines (24 loc) · 875 Bytes
/
dashboard_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
describe "dashboard" do
include Rack::Test::Methods
def app
JekyllAdmin::Server
end
it "returns the modified site payload" do
get "/dashboard"
expect(last_response).to be_ok
expect(last_response_parsed["site"]["posts"]).to eql(
[
"2016-01-01-test-post.md",
"test/2016-01-02-test2.md",
"2016-02-01-test-post-2.md",
"2016-03-01-test-post-3.md",
"more posts/2016-04-01-post-within-subdirectory.md",
"more posts/some more posts/2016-05-01-a-test-post-within-subdirectory.md",
"more posts/some more posts/2016-05-02-another-test-post-within-subdirectory.md",
]
)
expect(last_response_parsed["site"]["pages"]).to include("assets/style.scss")
expect(last_response_parsed["site"]["data"]).to eql(nil)
expect(last_response_parsed["site"]["documents"]).to eql(nil)
end
end