Skip to content

Commit a7396c7

Browse files
committed
Add request tests
- At this point we have a basic controller / view / route, so the basic request tests we add for all migrated routes will pass.
1 parent cb3bd4f commit a7396c7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
RSpec.describe "HTML publication" do
2+
let(:content_item) { GovukSchemas::Example.find("html_publication", example_name: "long_form_and_automatically_numbered_headings") }
3+
let(:base_path) { content_item.fetch("base_path") }
4+
5+
before do
6+
stub_content_store_has_item(base_path, content_item)
7+
end
8+
9+
describe "GET show" do
10+
context "when visiting a HTML publication page" do
11+
it "returns 200" do
12+
get base_path
13+
14+
expect(response).to have_http_status(:ok)
15+
end
16+
17+
it "renders the show template" do
18+
get base_path
19+
20+
expect(response).to render_template("show")
21+
end
22+
end
23+
end
24+
end

0 commit comments

Comments
 (0)