|
|
|
@ -1111,6 +1111,11 @@ RSpec.describe LettingsLogsController, type: :request do
|
|
|
|
|
get "/lettings-logs/#{completed_lettings_log.id}/income-and-benefits/check-answers", headers: { "Accept" => "text/html" }, params: {} |
|
|
|
|
expect(page).to have_link("Change") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "lets the user navigate to questions for previous collection year logs" do |
|
|
|
|
get "/lettings-logs/#{completed_lettings_log.id}/needs-type", headers: { "Accept" => "text/html" }, params: {} |
|
|
|
|
expect(response).to have_http_status(:ok) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "does not let the user navigate to questions for previous collection year logs" do |
|
|
|
@ -1216,7 +1221,7 @@ RSpec.describe LettingsLogsController, type: :request do
|
|
|
|
|
let(:headers) { { "Accept" => "text/html" } } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
allow(affected_lettings_log.form).to receive(:new_logs_end_date).and_return(Time.zone.today + 1.day) |
|
|
|
|
allow(affected_lettings_log.form).to receive(:edit_end_date).and_return(Time.zone.today + 1.day) |
|
|
|
|
allow(user).to receive(:need_two_factor_authentication?).and_return(false) |
|
|
|
|
sign_in user |
|
|
|
|
end |
|
|
|
|