Skip to content
Snippets Groups Projects
Commit cc51931d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix 500 error when rename repository

parent 5582ae14
No related branches found
No related tags found
1 merge request!6886DELETE THIS MERGE REQUEST
Loading
Loading
@@ -9,7 +9,7 @@ module Projects
 
new_branch = params[:project].delete(:default_branch)
 
if project.repository.exists? && new_branch != project.default_branch
if project.repository.exists? && new_branch && new_branch != project.default_branch
project.change_head(new_branch)
end
 
Loading
Loading
Loading
Loading
@@ -19,3 +19,8 @@ Feature: Project Feature
And change project settings
And I save project
Then I should see project with new settings
Scenario: I change project path
When I visit edit project "Shop" page
And change project path settings
Then I should see project with new path settings
Loading
Loading
@@ -3,16 +3,25 @@ class ProjectFeature < Spinach::FeatureSteps
include SharedProject
include SharedPaths
 
And 'change project settings' do
step 'change project settings' do
fill_in 'project_name', with: 'NewName'
uncheck 'project_issues_enabled'
end
 
And 'I save project' do
step 'I save project' do
click_button 'Save changes'
end
 
Then 'I should see project with new settings' do
step 'I should see project with new settings' do
find_field('project_name').value.should == 'NewName'
end
step 'change project path settings' do
fill_in "project_path", with: "new-path"
click_button "Rename"
end
step 'I should see project with new path settings' do
project.path.should == "new-path"
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment