Commit 44b1eadf087d793bac66ed50ba3ccc5e5739a081

Authored by Dmitriy Zaporozhets
2 parents bfcaf4e5 a6cbeaca

Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq

app/assets/stylesheets/sections/dashboard.scss
... ... @@ -73,6 +73,10 @@
73 73 font-weight: bold;
74 74 }
75 75  
  76 + a {
  77 + display: block;
  78 + }
  79 +
76 80 .project-name, .group-name {
77 81 font-size: 15px;
78 82 }
... ...
app/contexts/projects/update_context.rb
... ... @@ -9,7 +9,7 @@ module Projects
9 9  
10 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 13 project.change_head(new_branch)
14 14 end
15 15  
... ...
app/views/projects/edit.html.haml
... ... @@ -130,7 +130,7 @@
130 130 .title Transfer project
131 131 .errors-holder
132 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 134 .control-group
135 135 = f.label :namespace_id do
136 136 %span Namespace
... ...
features/project/project.feature
... ... @@ -19,3 +19,8 @@ Feature: Project Feature
19 19 And change project settings
20 20 And I save project
21 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 3 include SharedProject
4 4 include SharedPaths
5 5  
6   - And 'change project settings' do
  6 + step 'change project settings' do
7 7 fill_in 'project_name', with: 'NewName'
8 8 uncheck 'project_issues_enabled'
9 9 end
10 10  
11   - And 'I save project' do
  11 + step 'I save project' do
12 12 click_button 'Save changes'
13 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 16 find_field('project_name').value.should == 'NewName'
17 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 27 end
... ...