Commit 44b1eadf087d793bac66ed50ba3ccc5e5739a081
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
Showing
5 changed files
with
23 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/sections/dashboard.scss
app/contexts/projects/update_context.rb
| @@ -9,7 +9,7 @@ module Projects | @@ -9,7 +9,7 @@ module Projects | ||
| 9 | 9 | ||
| 10 | new_branch = params[:project].delete(:default_branch) | 10 | new_branch = params[:project].delete(:default_branch) |
| 11 | 11 | ||
| 12 | - if project.repository.exists? && new_branch != project.default_branch | 12 | + if project.repository.exists? && new_branch && new_branch != project.default_branch |
| 13 | project.change_head(new_branch) | 13 | project.change_head(new_branch) |
| 14 | end | 14 | end |
| 15 | 15 |
app/views/projects/edit.html.haml
| @@ -130,7 +130,7 @@ | @@ -130,7 +130,7 @@ | ||
| 130 | .title Transfer project | 130 | .title Transfer project |
| 131 | .errors-holder | 131 | .errors-holder |
| 132 | .form-holder | 132 | .form-holder |
| 133 | - = form_for(@project, url: transfer_project_path(@project), remote: true, html: { class: 'transfer-project' }) do |f| | 133 | + = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project' }) do |f| |
| 134 | .control-group | 134 | .control-group |
| 135 | = f.label :namespace_id do | 135 | = f.label :namespace_id do |
| 136 | %span Namespace | 136 | %span Namespace |
features/project/project.feature
| @@ -19,3 +19,8 @@ Feature: Project Feature | @@ -19,3 +19,8 @@ Feature: Project Feature | ||
| 19 | And change project settings | 19 | And change project settings |
| 20 | And I save project | 20 | And I save project |
| 21 | Then I should see project with new settings | 21 | Then I should see project with new settings |
| 22 | + | ||
| 23 | + Scenario: I change project path | ||
| 24 | + When I visit edit project "Shop" page | ||
| 25 | + And change project path settings | ||
| 26 | + Then I should see project with new path settings |
features/steps/project/project.rb
| @@ -3,16 +3,25 @@ class ProjectFeature < Spinach::FeatureSteps | @@ -3,16 +3,25 @@ class ProjectFeature < Spinach::FeatureSteps | ||
| 3 | include SharedProject | 3 | include SharedProject |
| 4 | include SharedPaths | 4 | include SharedPaths |
| 5 | 5 | ||
| 6 | - And 'change project settings' do | 6 | + step 'change project settings' do |
| 7 | fill_in 'project_name', with: 'NewName' | 7 | fill_in 'project_name', with: 'NewName' |
| 8 | uncheck 'project_issues_enabled' | 8 | uncheck 'project_issues_enabled' |
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | - And 'I save project' do | 11 | + step 'I save project' do |
| 12 | click_button 'Save changes' | 12 | click_button 'Save changes' |
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | - Then 'I should see project with new settings' do | 15 | + step 'I should see project with new settings' do |
| 16 | find_field('project_name').value.should == 'NewName' | 16 | find_field('project_name').value.should == 'NewName' |
| 17 | end | 17 | end |
| 18 | + | ||
| 19 | + step 'change project path settings' do | ||
| 20 | + fill_in "project_path", with: "new-path" | ||
| 21 | + click_button "Rename" | ||
| 22 | + end | ||
| 23 | + | ||
| 24 | + step 'I should see project with new path settings' do | ||
| 25 | + project.path.should == "new-path" | ||
| 26 | + end | ||
| 18 | end | 27 | end |