|
|
|
@ -1238,7 +1238,7 @@ RSpec.describe LocationsController, type: :request do |
|
|
|
context "when signed in as a data coordinator" do |
|
|
|
context "when signed in as a data coordinator" do |
|
|
|
let(:user) { FactoryBot.create(:user, :data_coordinator) } |
|
|
|
let(:user) { FactoryBot.create(:user, :data_coordinator) } |
|
|
|
let!(:scheme) { FactoryBot.create(:scheme, owning_organisation: user.organisation) } |
|
|
|
let!(:scheme) { FactoryBot.create(:scheme, owning_organisation: user.organisation) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:, startdate: nil, created_at: Time.zone.local(2022, 4, 1)) } |
|
|
|
let(:deactivation_date) { Time.utc(2022, 10, 10) } |
|
|
|
let(:deactivation_date) { Time.utc(2022, 10, 10) } |
|
|
|
let!(:lettings_log) { FactoryBot.create(:lettings_log, :sh, location:, scheme:, startdate:, owning_organisation: user.organisation) } |
|
|
|
let!(:lettings_log) { FactoryBot.create(:lettings_log, :sh, location:, scheme:, startdate:, owning_organisation: user.organisation) } |
|
|
|
let(:startdate) { Time.utc(2022, 10, 11) } |
|
|
|
let(:startdate) { Time.utc(2022, 10, 11) } |
|
|
|
@ -1477,7 +1477,7 @@ RSpec.describe LocationsController, type: :request do |
|
|
|
context "when signed in as a data coordinator" do |
|
|
|
context "when signed in as a data coordinator" do |
|
|
|
let(:user) { FactoryBot.create(:user, :data_coordinator) } |
|
|
|
let(:user) { FactoryBot.create(:user, :data_coordinator) } |
|
|
|
let!(:scheme) { FactoryBot.create(:scheme, owning_organisation: user.organisation) } |
|
|
|
let!(:scheme) { FactoryBot.create(:scheme, owning_organisation: user.organisation) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:) } |
|
|
|
let!(:location) { FactoryBot.create(:location, scheme:, startdate: nil) } |
|
|
|
let(:deactivation_date) { Time.zone.local(2022, 4, 1) } |
|
|
|
let(:deactivation_date) { Time.zone.local(2022, 4, 1) } |
|
|
|
let(:startdate) { Time.utc(2022, 10, 11) } |
|
|
|
let(:startdate) { Time.utc(2022, 10, 11) } |
|
|
|
|
|
|
|
|
|
|
|
|