BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f3369e3a
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
projects_controller.rb
app/controllers/admin/projects_controller.rb
+2
-6
projects.feature
features/admin/projects.feature
+6
-0
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