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
Boxiang Sun
gitlab-ce
Commits
0fa1c545
Commit
0fa1c545
authored
Jan 25, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `:empty_project` where possible in finder specs
parent
403cb125
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
23 deletions
+23
-23
spec/finders/branches_finder_spec.rb
spec/finders/branches_finder_spec.rb
+1
-1
spec/finders/contributed_projects_finder_spec.rb
spec/finders/contributed_projects_finder_spec.rb
+2
-2
spec/finders/group_projects_finder_spec.rb
spec/finders/group_projects_finder_spec.rb
+5
-5
spec/finders/joined_groups_finder_spec.rb
spec/finders/joined_groups_finder_spec.rb
+1
-1
spec/finders/merge_requests_finder_spec.rb
spec/finders/merge_requests_finder_spec.rb
+3
-3
spec/finders/notes_finder_spec.rb
spec/finders/notes_finder_spec.rb
+2
-2
spec/finders/personal_projects_finder_spec.rb
spec/finders/personal_projects_finder_spec.rb
+3
-3
spec/finders/pipelines_finder_spec.rb
spec/finders/pipelines_finder_spec.rb
+1
-1
spec/finders/projects_finder_spec.rb
spec/finders/projects_finder_spec.rb
+4
-4
spec/finders/tags_finder_spec.rb
spec/finders/tags_finder_spec.rb
+1
-1
No files found.
spec/finders/branches_finder_spec.rb
View file @
0fa1c545
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
BranchesFinder
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
describe
'#execute'
do
...
...
spec/finders/contributed_projects_finder_spec.rb
View file @
0fa1c545
...
...
@@ -6,8 +6,8 @@ describe ContributedProjectsFinder do
let
(
:finder
)
{
described_class
.
new
(
source_user
)
}
let!
(
:public_project
)
{
create
(
:project
,
:public
)
}
let!
(
:private_project
)
{
create
(
:project
,
:private
)
}
let!
(
:public_project
)
{
create
(
:
empty_
project
,
:public
)
}
let!
(
:private_project
)
{
create
(
:
empty_
project
,
:private
)
}
before
do
private_project
.
team
<<
[
source_user
,
Gitlab
::
Access
::
MASTER
]
...
...
spec/finders/group_projects_finder_spec.rb
View file @
0fa1c545
...
...
@@ -6,11 +6,11 @@ describe GroupProjectsFinder do
let
(
:finder
)
{
described_class
.
new
(
source_user
)
}
let!
(
:public_project
)
{
create
(
:project
,
:public
,
group:
group
,
path:
'1'
)
}
let!
(
:private_project
)
{
create
(
:project
,
:private
,
group:
group
,
path:
'2'
)
}
let!
(
:shared_project_1
)
{
create
(
:project
,
:public
,
path:
'3'
)
}
let!
(
:shared_project_2
)
{
create
(
:project
,
:private
,
path:
'4'
)
}
let!
(
:shared_project_3
)
{
create
(
:project
,
:internal
,
path:
'5'
)
}
let!
(
:public_project
)
{
create
(
:
empty_
project
,
:public
,
group:
group
,
path:
'1'
)
}
let!
(
:private_project
)
{
create
(
:
empty_
project
,
:private
,
group:
group
,
path:
'2'
)
}
let!
(
:shared_project_1
)
{
create
(
:
empty_
project
,
:public
,
path:
'3'
)
}
let!
(
:shared_project_2
)
{
create
(
:
empty_
project
,
:private
,
path:
'4'
)
}
let!
(
:shared_project_3
)
{
create
(
:
empty_
project
,
:internal
,
path:
'5'
)
}
before
do
shared_project_1
.
project_group_links
.
create
(
group_access:
Gitlab
::
Access
::
MASTER
,
group:
group
)
...
...
spec/finders/joined_groups_finder_spec.rb
View file @
0fa1c545
...
...
@@ -42,7 +42,7 @@ describe JoinedGroupsFinder do
context
'if profile visitor is in one of the private group projects'
do
before
do
project
=
create
(
:project
,
:private
,
group:
private_group
,
name:
'B'
,
path:
'B'
)
project
=
create
(
:
empty_
project
,
:private
,
group:
private_group
,
name:
'B'
,
path:
'B'
)
project
.
add_user
(
profile_visitor
,
Gitlab
::
Access
::
DEVELOPER
)
end
...
...
spec/finders/merge_requests_finder_spec.rb
View file @
0fa1c545
...
...
@@ -4,9 +4,9 @@ describe MergeRequestsFinder do
let
(
:user
)
{
create
:user
}
let
(
:user2
)
{
create
:user
}
let
(
:project1
)
{
create
(
:project
)
}
let
(
:project2
)
{
create
(
:project
,
forked_from_project:
project1
)
}
let
(
:project3
)
{
create
(
:project
,
:archived
,
forked_from_project:
project1
)
}
let
(
:project1
)
{
create
(
:
empty_
project
)
}
let
(
:project2
)
{
create
(
:
empty_
project
,
forked_from_project:
project1
)
}
let
(
:project3
)
{
create
(
:
empty_
project
,
:archived
,
forked_from_project:
project1
)
}
let!
(
:merge_request1
)
{
create
(
:merge_request
,
:simple
,
author:
user
,
source_project:
project2
,
target_project:
project1
)
}
let!
(
:merge_request2
)
{
create
(
:merge_request
,
:simple
,
author:
user
,
source_project:
project2
,
target_project:
project1
,
state:
'closed'
)
}
...
...
spec/finders/notes_finder_spec.rb
View file @
0fa1c545
...
...
@@ -28,7 +28,7 @@ describe NotesFinder do
end
it
"excludes notes on commits the author can't download"
do
project
=
create
(
:project
,
:private
)
project
=
create
(
:project
,
:private
,
:repository
)
note
=
create
(
:note_on_commit
,
project:
project
)
params
=
{
target_type:
'commit'
,
target_id:
note
.
noteable
.
id
}
...
...
@@ -76,7 +76,7 @@ describe NotesFinder do
end
context
'for target'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:note1
)
{
create
:note_on_commit
,
project:
project
}
let
(
:note2
)
{
create
:note_on_commit
,
project:
project
}
let
(
:commit
)
{
note1
.
noteable
}
...
...
spec/finders/personal_projects_finder_spec.rb
View file @
0fa1c545
...
...
@@ -4,14 +4,14 @@ describe PersonalProjectsFinder do
let
(
:source_user
)
{
create
(
:user
)
}
let
(
:current_user
)
{
create
(
:user
)
}
let
(
:finder
)
{
described_class
.
new
(
source_user
)
}
let!
(
:public_project
)
{
create
(
:project
,
:public
,
namespace:
source_user
.
namespace
)
}
let!
(
:public_project
)
{
create
(
:
empty_
project
,
:public
,
namespace:
source_user
.
namespace
)
}
let!
(
:private_project
)
do
create
(
:project
,
:private
,
namespace:
source_user
.
namespace
,
path:
'mepmep'
)
create
(
:
empty_
project
,
:private
,
namespace:
source_user
.
namespace
,
path:
'mepmep'
)
end
let!
(
:internal_project
)
do
create
(
:project
,
:internal
,
namespace:
source_user
.
namespace
,
path:
'C'
)
create
(
:
empty_
project
,
:internal
,
namespace:
source_user
.
namespace
,
path:
'C'
)
end
before
do
...
...
spec/finders/pipelines_finder_spec.rb
View file @
0fa1c545
require
'spec_helper'
describe
PipelinesFinder
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:tag_pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'v1.0.0'
)
}
let!
(
:branch_pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
...
...
spec/finders/projects_finder_spec.rb
View file @
0fa1c545
...
...
@@ -6,19 +6,19 @@ describe ProjectsFinder do
let
(
:group
)
{
create
(
:group
,
:public
)
}
let!
(
:private_project
)
do
create
(
:project
,
:private
,
name:
'A'
,
path:
'A'
)
create
(
:
empty_
project
,
:private
,
name:
'A'
,
path:
'A'
)
end
let!
(
:internal_project
)
do
create
(
:project
,
:internal
,
group:
group
,
name:
'B'
,
path:
'B'
)
create
(
:
empty_
project
,
:internal
,
group:
group
,
name:
'B'
,
path:
'B'
)
end
let!
(
:public_project
)
do
create
(
:project
,
:public
,
group:
group
,
name:
'C'
,
path:
'C'
)
create
(
:
empty_
project
,
:public
,
group:
group
,
name:
'C'
,
path:
'C'
)
end
let!
(
:shared_project
)
do
create
(
:project
,
:private
,
name:
'D'
,
path:
'D'
)
create
(
:
empty_
project
,
:private
,
name:
'D'
,
path:
'D'
)
end
let
(
:finder
)
{
described_class
.
new
}
...
...
spec/finders/tags_finder_spec.rb
View file @
0fa1c545
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
TagsFinder
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
describe
'#execute'
do
...
...
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