mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Show banner after successfully deletion of version
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user