Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
280e41570f87
Commit
3af0fe3e
authored
Dec 23, 2013
by
Dmitriy Zaporozhets
Browse files
Merge branch 'bug/broken_path_change' of /home/git/repositories/gitlab/gitlabhq
parents
b80d9248779b
41f8d9670048
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/contexts/projects/update_context.rb
View file @
280e4157
...
...
@@ -9,7 +9,7 @@ def execute(role = :default)
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
...
...
features/project/project.feature
View file @
280e4157
...
...
@@ -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
features/steps/project/project.rb
View file @
280e4157
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment