|
|
|
@ -831,7 +831,7 @@ RSpec.describe LettingsLogsController, type: :request do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when viewing a specific log affected by deactivated location" do |
|
|
|
context "when viewing a specific log affected by deactivated location" do |
|
|
|
let!(:affected_lettings_log) { FactoryBot.create(:lettings_log, impacted_by_deactivation: true, created_by: user) } |
|
|
|
let!(:affected_lettings_log) { FactoryBot.create(:lettings_log, impacted_by_deactivation: true, created_by: user, needstype: 2) } |
|
|
|
let(:headers) { { "Accept" => "text/html" } } |
|
|
|
let(:headers) { { "Accept" => "text/html" } } |
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
@ -845,6 +845,16 @@ RSpec.describe LettingsLogsController, type: :request do |
|
|
|
follow_redirect! |
|
|
|
follow_redirect! |
|
|
|
expect(page).to have_content("What is the tenancy start date?") |
|
|
|
expect(page).to have_content("What is the tenancy start date?") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "tenancy start date page links to the scheme page" do |
|
|
|
|
|
|
|
get "/lettings-logs/#{affected_lettings_log.id}/tenancy-start-date", headers:, params: {} |
|
|
|
|
|
|
|
expect(page).to have_link("Skip for now", href: "/lettings-logs/#{affected_lettings_log.id}/scheme") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "scheme page links to the locations page" do |
|
|
|
|
|
|
|
get "/lettings-logs/#{affected_lettings_log.id}/scheme", headers:, params: {} |
|
|
|
|
|
|
|
expect(page).to have_link("Skip for now", href: "/lettings-logs/#{affected_lettings_log.id}/location") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|