You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
require "rails_helper" |
|
|
|
RSpec.describe ContentController, type: :request do |
|
let(:headers) { { "Accept" => "text/html" } } |
|
let(:page) { Capybara::Node::Simple.new(response.body) } |
|
|
|
describe "render privacy notice content page" do |
|
before do |
|
get "/privacy-notice", headers:, params: {} |
|
end |
|
|
|
it "returns a 200" do |
|
expect(response).to have_http_status(:success) |
|
end |
|
|
|
it "returns the page" do |
|
expect(page).to have_title("Privacy notice") |
|
end |
|
end |
|
|
|
describe "render accessibility statement content page" do |
|
before do |
|
get "/accessibility-statement", headers:, params: {} |
|
end |
|
|
|
it "returns a 200" do |
|
expect(response).to have_http_status(:success) |
|
end |
|
|
|
it "returns the page" do |
|
expect(page).to have_title("Accessibility statement") |
|
end |
|
end |
|
|
|
describe "render data sharing agreement" do |
|
before do |
|
get "/data-sharing-agreement", headers:, params: {} |
|
end |
|
|
|
it "returns a 200" do |
|
expect(response).to have_http_status(:success) |
|
end |
|
|
|
it "returns the page" do |
|
expect(page).to have_title("Data sharing agreement") |
|
end |
|
end |
|
end
|
|
|