require 'rails_helper'
RSpec.feature "custom domain redirects", type: :feature do
describe "GET to sophia url" do
it "does not redirect" do
visit "/"
expect(page).to have_content("Sign In")
expect(page.status_code).to equal(200)
end
end
describe "GET custom domain url when signed out" do
it "tries to transfer session and redirects back to url" do
expect(page).to have_content("Sign In")
expect(page.status_code).to equal(200)
end
end
describe "GET custom domain url when signed in", js: true do
it "transfers session and redirects to url" do
sign_in
expect(page).to have_content("My Content")
# This lines gives me an error sayind the DNS can't be resolved.
# expect(page).to have_content("Dashboard")
end
end
end