|
|
|
@ -1249,6 +1249,10 @@ RSpec.describe LocationsController, type: :request do
|
|
|
|
|
patch "/schemes/#{scheme.id}/locations/#{location.id}/new-deactivation", params: |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "with default date" do |
|
|
|
|
let(:params) { { location: { deactivation_date_type: "default", deactivation_date: } } } |
|
|
|
|
|
|
|
|
@ -1278,6 +1282,10 @@ RSpec.describe LocationsController, type: :request do
|
|
|
|
|
patch "/schemes/#{scheme.id}/locations/#{location.id}/deactivate", params: |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "updates existing location with valid deactivation date and renders location page" do |
|
|
|
|
follow_redirect! |
|
|
|
|
expect(response).to have_http_status(:ok) |
|
|
|
@ -1402,6 +1410,10 @@ RSpec.describe LocationsController, type: :request do
|
|
|
|
|
get "/schemes/#{scheme.id}/locations/#{location.id}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "with active location" do |
|
|
|
|
let(:add_deactivations) {} |
|
|
|
|
|
|
|
|
|