Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
f3369e3a
Commit
f3369e3a
authored
Jun 19, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project trasnfer for admin area
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
67934145
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
app/controllers/admin/projects_controller.rb
app/controllers/admin/projects_controller.rb
+2
-6
features/admin/projects.feature
features/admin/projects.feature
+6
-0
features/steps/admin/projects.rb
features/steps/admin/projects.rb
+26
-0
No files found.
app/controllers/admin/projects_controller.rb
View file @
f3369e3a
...
...
@@ -23,13 +23,9 @@ class Admin::ProjectsController < Admin::ApplicationController
end
def
transfer
result
=
::
Projects
::
TransferService
.
new
(
@project
,
current_user
,
project:
params
).
execute
(
:admin
)
::
Projects
::
TransferService
.
new
(
@project
,
current_user
,
params
.
dup
).
execute
if
result
redirect_to
[
:admin
,
@project
]
else
render
:show
end
redirect_to
[
:admin
,
@project
.
reload
]
end
protected
...
...
features/admin/projects.feature
View file @
f3369e3a
...
...
@@ -12,3 +12,9 @@ Feature: Admin Projects
When
I visit admin projects page
And
I click on first project
Then
I should see project details
Scenario
:
Transfer project
Given
group 'Web'
And
I visit admin project page
When
I transfer project to group 'Web'
Then
I should see project transfered
features/steps/admin/projects.rb
View file @
f3369e3a
...
...
@@ -19,4 +19,30 @@ class AdminProjects < Spinach::FeatureSteps
page
.
should
have_content
(
project
.
name_with_namespace
)
page
.
should
have_content
(
project
.
creator
.
name
)
end
step
'I visit admin project page'
do
visit
admin_project_path
(
project
)
end
step
'I transfer project to group \'Web\''
do
find
(
:xpath
,
"//input[@id='namespace_id']"
).
set
group
.
id
click_button
'Transfer'
end
step
'group \'Web\''
do
create
(
:group
,
name:
'Web'
)
end
step
'I should see project transfered'
do
page
.
should
have_content
'Web / '
+
project
.
name
page
.
should
have_content
'Namespace: Web'
end
def
project
@project
||=
Project
.
first
end
def
group
Group
.
find_by
(
name:
'Web'
)
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