Browse Source

Fix some tests

pull/2605/head
Manny Dinssa 2 years ago
parent
commit
fb7fd63120
  1. 2
      app/views/schemes/details.html.erb
  2. 3
      spec/requests/schemes_controller_spec.rb

2
app/views/schemes/details.html.erb

@ -1,7 +1,7 @@
<% content_for :title, "Create a new supported housing scheme" %> <% content_for :title, "Create a new supported housing scheme" %>
<% content_for :before_content do %> <% content_for :before_content do %>
<%= govuk_back_link(href: schemes_path) %> <%= govuk_back_link(href: :back) %>
<% end %> <% end %>
<%= form_for(@scheme, method: :patch) do |f| %> <%= form_for(@scheme, method: :patch) do |f| %>

3
spec/requests/schemes_controller_spec.rb

@ -748,7 +748,7 @@ RSpec.describe SchemesController, type: :request do
let(:add_deactivations) { scheme.scheme_deactivation_periods << scheme_deactivation_period } let(:add_deactivations) { scheme.scheme_deactivation_periods << scheme_deactivation_period }
before do before do
create(:location, scheme:) create(:location, scheme:, startdate: Time.utc(2022, 9, 9))
Timecop.freeze(Time.utc(2022, 10, 10)) Timecop.freeze(Time.utc(2022, 10, 10))
sign_in user sign_in user
add_deactivations add_deactivations
@ -784,6 +784,7 @@ RSpec.describe SchemesController, type: :request do
context "and associated logs in editable collection period" do context "and associated logs in editable collection period" do
before do before do
create(:location, scheme:, startdate: Time.zone.local(2022, 9, 9))
create(:lettings_log, :sh, scheme:, startdate: Time.zone.local(2022, 9, 9), owning_organisation: user.organisation) create(:lettings_log, :sh, scheme:, startdate: Time.zone.local(2022, 9, 9), owning_organisation: user.organisation)
get "/schemes/#{scheme.id}" get "/schemes/#{scheme.id}"
end end

Loading…
Cancel
Save