Project

General

Profile

Patch #35610 » 0002-Redirect_to-project_path-after-WikisController-destr.patch

Mischa The Evil, 2021-01-27 09:59

View differences:

app/controllers/wikis_controller.rb
25 25
  def destroy
26 26
    if request.post? && params[:confirm] && @project.wiki
27 27
      @project.wiki.destroy
28
      redirect_to settings_project_path(@project, :tab => 'wiki')
28
      redirect_to project_path(@project)
29 29
    end
30 30
  end
31 31
end
test/functional/wikis_controller_test.rb
40 40
    @request.session[:user_id] = 1
41 41
    post :destroy, :params => {:id => 1, :confirm => 1}
42 42
    assert_redirected_to :controller => 'projects',
43
                         :action => 'settings', :id => 'ecookbook', :tab => 'wiki'
43
                         :action => 'show', :id => 'ecookbook'
44 44
    assert_nil Project.find(1).wiki
45 45
  end
46 46

  
(2-2/3)