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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bf6961ca
Commit
bf6961ca
authored
Jun 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just let the user to create the namespace
parent
d919f924
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
spec/models/forked_project_link_spec.rb
spec/models/forked_project_link_spec.rb
+2
-2
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+4
-4
No files found.
spec/models/forked_project_link_spec.rb
View file @
bf6961ca
...
@@ -2,8 +2,8 @@ require 'spec_helper'
...
@@ -2,8 +2,8 @@ require 'spec_helper'
describe
ForkedProjectLink
,
"add link on fork"
do
describe
ForkedProjectLink
,
"add link on fork"
do
let
(
:project_from
)
{
create
(
:project
,
:repository
)
}
let
(
:project_from
)
{
create
(
:project
,
:repository
)
}
let
(
:
namespace
)
{
create
(
:namespace
)
}
let
(
:
user
)
{
create
(
:user
)
}
let
(
:
user
)
{
create
(
:user
,
namespace:
namespace
)
}
let
(
:
namespace
)
{
user
.
namespace
}
before
do
before
do
create
(
:project_member
,
:reporter
,
user:
user
,
project:
project_from
)
create
(
:project_member
,
:reporter
,
user:
user
,
project:
project_from
)
...
...
spec/services/projects/fork_service_spec.rb
View file @
bf6961ca
...
@@ -3,8 +3,8 @@ require 'spec_helper'
...
@@ -3,8 +3,8 @@ require 'spec_helper'
describe
Projects
::
ForkService
,
services:
true
do
describe
Projects
::
ForkService
,
services:
true
do
describe
'fork by user'
do
describe
'fork by user'
do
before
do
before
do
@from_
namespace
=
create
(
:namespace
)
@from_
user
=
create
(
:user
)
@from_
user
=
create
(
:user
,
namespace:
@from_namespace
)
@from_
namespace
=
@from_user
.
namespace
avatar
=
fixture_file_upload
(
Rails
.
root
+
"spec/fixtures/dk.png"
,
"image/png"
)
avatar
=
fixture_file_upload
(
Rails
.
root
+
"spec/fixtures/dk.png"
,
"image/png"
)
@from_project
=
create
(
:project
,
@from_project
=
create
(
:project
,
:repository
,
:repository
,
...
@@ -13,8 +13,8 @@ describe Projects::ForkService, services: true do
...
@@ -13,8 +13,8 @@ describe Projects::ForkService, services: true do
star_count:
107
,
star_count:
107
,
avatar:
avatar
,
avatar:
avatar
,
description:
'wow such project'
)
description:
'wow such project'
)
@to_
namespace
=
create
(
:namespace
)
@to_
user
=
create
(
:user
)
@to_
user
=
create
(
:user
,
namespace:
@to_namespace
)
@to_
namespace
=
@to_user
.
namespace
@from_project
.
add_user
(
@to_user
,
:developer
)
@from_project
.
add_user
(
@to_user
,
:developer
)
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