Show banner after successfully deletion of version

This commit is contained in:
Henriette Darge
2026-04-30 09:26:27 +02:00
parent 823194a1c1
commit 4b1fc96ccd
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -107,6 +107,7 @@ class VersionsController < ApplicationController
flash[:error] << archived_project_mesage if archived_projects.any?
end
flash[:notice] = I18n.t :notice_successful_delete
redirect_to project_settings_versions_path(@project), status: :see_other
end
@@ -356,6 +356,7 @@ RSpec.describe VersionsController do
end
it "redirects to projects versions and the version is deleted" do
expect(flash[:notice]).to eq(I18n.t(:notice_successful_delete))
expect(response).to redirect_to(project_settings_versions_path(project))
expect { Version.find(@deleted) }.to raise_error ActiveRecord::RecordNotFound
end