Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions spec/features/user_views_ember_app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@
end
end

# `render_ember_app` emits the application's complete HTML document, so the
# rendering action must disable its layout — the dummy application uses
# `HighVoltage.layout = false` — or the document ends up nested inside the
# layout's `<body>`.
scenario "renders a single, complete HTML document", js: false do
[include_index_path, include_index_head_and_body_path, default_path].each do |path|
visit path

expect(page.html.scan(/<!DOCTYPE/i).count).to eq(1)
expect(page.html.scan(/<html/i).count).to eq(1)
expect(page.html).not_to include("<title>Dummy</title>")
end
end

scenario "is redirected with trailing slash", js: false do
expect(include_index_path).to eq("/no-block")

Expand Down