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
Léo-Paul Géneau
gitlab-ce
Commits
def164e7
Commit
def164e7
authored
Mar 24, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RSpec/DescribeSymbol cop violations
parent
f1e1e513
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
48 additions
and
48 deletions
+48
-48
spec/lib/gitlab/git/blob_snippet_spec.rb
spec/lib/gitlab/git/blob_snippet_spec.rb
+1
-1
spec/lib/gitlab/git/blob_spec.rb
spec/lib/gitlab/git/blob_spec.rb
+4
-4
spec/lib/gitlab/git/commit_spec.rb
spec/lib/gitlab/git/commit_spec.rb
+14
-14
spec/lib/gitlab/git/compare_spec.rb
spec/lib/gitlab/git/compare_spec.rb
+5
-5
spec/lib/gitlab/git/diff_collection_spec.rb
spec/lib/gitlab/git/diff_collection_spec.rb
+2
-2
spec/lib/gitlab/git/tree_spec.rb
spec/lib/gitlab/git/tree_spec.rb
+5
-5
spec/lib/gitlab/git/util_spec.rb
spec/lib/gitlab/git/util_spec.rb
+1
-1
spec/lib/gitlab/ldap/user_spec.rb
spec/lib/gitlab/ldap/user_spec.rb
+1
-1
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+1
-1
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+1
-1
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+7
-7
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+1
-1
spec/requests/api/v3/projects_spec.rb
spec/requests/api/v3/projects_spec.rb
+1
-1
spec/services/milestones/close_service_spec.rb
spec/services/milestones/close_service_spec.rb
+1
-1
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+2
-2
No files found.
spec/lib/gitlab/git/blob_snippet_spec.rb
View file @
def164e7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
"spec_helper"
require
"spec_helper"
describe
Gitlab
::
Git
::
BlobSnippet
,
seed_helper:
true
do
describe
Gitlab
::
Git
::
BlobSnippet
,
seed_helper:
true
do
describe
:data
do
describe
'#data'
do
context
'empty lines'
do
context
'empty lines'
do
let
(
:snippet
)
{
Gitlab
::
Git
::
BlobSnippet
.
new
(
'master'
,
nil
,
nil
,
nil
)
}
let
(
:snippet
)
{
Gitlab
::
Git
::
BlobSnippet
.
new
(
'master'
,
nil
,
nil
,
nil
)
}
...
...
spec/lib/gitlab/git/blob_spec.rb
View file @
def164e7
...
@@ -5,7 +5,7 @@ require "spec_helper"
...
@@ -5,7 +5,7 @@ require "spec_helper"
describe
Gitlab
::
Git
::
Blob
,
seed_helper:
true
do
describe
Gitlab
::
Git
::
Blob
,
seed_helper:
true
do
let
(
:repository
)
{
Gitlab
::
Git
::
Repository
.
new
(
TEST_REPO_PATH
)
}
let
(
:repository
)
{
Gitlab
::
Git
::
Repository
.
new
(
TEST_REPO_PATH
)
}
describe
:initialize
do
describe
'initialize'
do
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
new
(
name:
'test'
)
}
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
new
(
name:
'test'
)
}
it
'handles nil data'
do
it
'handles nil data'
do
...
@@ -15,7 +15,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
...
@@ -15,7 +15,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
end
end
end
describe
:find
do
describe
'.find'
do
context
'file in subdir'
do
context
'file in subdir'
do
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
,
"files/ruby/popen.rb"
)
}
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
,
"files/ruby/popen.rb"
)
}
...
@@ -101,7 +101,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
...
@@ -101,7 +101,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
end
end
end
describe
:raw
do
describe
'.raw'
do
let
(
:raw_blob
)
{
Gitlab
::
Git
::
Blob
.
raw
(
repository
,
SeedRepo
::
RubyBlob
::
ID
)
}
let
(
:raw_blob
)
{
Gitlab
::
Git
::
Blob
.
raw
(
repository
,
SeedRepo
::
RubyBlob
::
ID
)
}
it
{
expect
(
raw_blob
.
id
).
to
eq
(
SeedRepo
::
RubyBlob
::
ID
)
}
it
{
expect
(
raw_blob
.
id
).
to
eq
(
SeedRepo
::
RubyBlob
::
ID
)
}
it
{
expect
(
raw_blob
.
data
[
0
..
10
]).
to
eq
(
"require
\'
fi"
)
}
it
{
expect
(
raw_blob
.
data
[
0
..
10
]).
to
eq
(
"require
\'
fi"
)
}
...
@@ -222,7 +222,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
...
@@ -222,7 +222,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
end
end
end
describe
:lfs_pointers
do
describe
'lfs_pointers'
do
context
'file a valid lfs pointer'
do
context
'file a valid lfs pointer'
do
let
(
:blob
)
do
let
(
:blob
)
do
Gitlab
::
Git
::
Blob
.
find
(
Gitlab
::
Git
::
Blob
.
find
(
...
...
spec/lib/gitlab/git/commit_spec.rb
View file @
def164e7
...
@@ -65,7 +65,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -65,7 +65,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
context
'Class methods'
do
context
'Class methods'
do
describe
:find
do
describe
'.find'
do
it
"should return first head commit if without params"
do
it
"should return first head commit if without params"
do
expect
(
Gitlab
::
Git
::
Commit
.
last
(
repository
).
id
).
to
eq
(
expect
(
Gitlab
::
Git
::
Commit
.
last
(
repository
).
id
).
to
eq
(
repository
.
raw
.
head
.
target
.
oid
repository
.
raw
.
head
.
target
.
oid
...
@@ -103,7 +103,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -103,7 +103,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:last_for_path
do
describe
'.last_for_path'
do
context
'no path'
do
context
'no path'
do
subject
{
Gitlab
::
Git
::
Commit
.
last_for_path
(
repository
,
'master'
)
}
subject
{
Gitlab
::
Git
::
Commit
.
last_for_path
(
repository
,
'master'
)
}
...
@@ -132,7 +132,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -132,7 +132,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
"where"
do
describe
'.where'
do
context
'path is empty string'
do
context
'path is empty string'
do
subject
do
subject
do
commits
=
Gitlab
::
Git
::
Commit
.
where
(
commits
=
Gitlab
::
Git
::
Commit
.
where
(
...
@@ -230,7 +230,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -230,7 +230,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:between
do
describe
'.between'
do
subject
do
subject
do
commits
=
Gitlab
::
Git
::
Commit
.
between
(
repository
,
SeedRepo
::
Commit
::
PARENT_ID
,
SeedRepo
::
Commit
::
ID
)
commits
=
Gitlab
::
Git
::
Commit
.
between
(
repository
,
SeedRepo
::
Commit
::
PARENT_ID
,
SeedRepo
::
Commit
::
ID
)
commits
.
map
{
|
c
|
c
.
id
}
commits
.
map
{
|
c
|
c
.
id
}
...
@@ -243,7 +243,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -243,7 +243,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
it
{
is_expected
.
not_to
include
(
SeedRepo
::
FirstCommit
::
ID
)
}
it
{
is_expected
.
not_to
include
(
SeedRepo
::
FirstCommit
::
ID
)
}
end
end
describe
:find_all
do
describe
'.find_all'
do
context
'max_count'
do
context
'max_count'
do
subject
do
subject
do
commits
=
Gitlab
::
Git
::
Commit
.
find_all
(
commits
=
Gitlab
::
Git
::
Commit
.
find_all
(
...
@@ -304,7 +304,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -304,7 +304,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:init_from_rugged
do
describe
'#init_from_rugged'
do
let
(
:gitlab_commit
)
{
Gitlab
::
Git
::
Commit
.
new
(
rugged_commit
)
}
let
(
:gitlab_commit
)
{
Gitlab
::
Git
::
Commit
.
new
(
rugged_commit
)
}
subject
{
gitlab_commit
}
subject
{
gitlab_commit
}
...
@@ -314,7 +314,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -314,7 +314,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:init_from_hash
do
describe
'#init_from_hash'
do
let
(
:commit
)
{
Gitlab
::
Git
::
Commit
.
new
(
sample_commit_hash
)
}
let
(
:commit
)
{
Gitlab
::
Git
::
Commit
.
new
(
sample_commit_hash
)
}
subject
{
commit
}
subject
{
commit
}
...
@@ -329,7 +329,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -329,7 +329,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:stats
do
describe
'#stats'
do
subject
{
commit
.
stats
}
subject
{
commit
.
stats
}
describe
'#additions'
do
describe
'#additions'
do
...
@@ -343,25 +343,25 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -343,25 +343,25 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:to_diff
do
describe
'#to_diff'
do
subject
{
commit
.
to_diff
}
subject
{
commit
.
to_diff
}
it
{
is_expected
.
not_to
include
"From
#{
SeedRepo
::
Commit
::
ID
}
"
}
it
{
is_expected
.
not_to
include
"From
#{
SeedRepo
::
Commit
::
ID
}
"
}
it
{
is_expected
.
to
include
'diff --git a/files/ruby/popen.rb b/files/ruby/popen.rb'
}
it
{
is_expected
.
to
include
'diff --git a/files/ruby/popen.rb b/files/ruby/popen.rb'
}
end
end
describe
:has_zero_stats?
do
describe
'#has_zero_stats?'
do
it
{
expect
(
commit
.
has_zero_stats?
).
to
eq
(
false
)
}
it
{
expect
(
commit
.
has_zero_stats?
).
to
eq
(
false
)
}
end
end
describe
:to_patch
do
describe
'#to_patch'
do
subject
{
commit
.
to_patch
}
subject
{
commit
.
to_patch
}
it
{
is_expected
.
to
include
"From
#{
SeedRepo
::
Commit
::
ID
}
"
}
it
{
is_expected
.
to
include
"From
#{
SeedRepo
::
Commit
::
ID
}
"
}
it
{
is_expected
.
to
include
'diff --git a/files/ruby/popen.rb b/files/ruby/popen.rb'
}
it
{
is_expected
.
to
include
'diff --git a/files/ruby/popen.rb b/files/ruby/popen.rb'
}
end
end
describe
:to_hash
do
describe
'#to_hash'
do
let
(
:hash
)
{
commit
.
to_hash
}
let
(
:hash
)
{
commit
.
to_hash
}
subject
{
hash
}
subject
{
hash
}
...
@@ -373,7 +373,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -373,7 +373,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
end
end
end
end
describe
:diffs
do
describe
'#diffs'
do
subject
{
commit
.
diffs
}
subject
{
commit
.
diffs
}
it
{
is_expected
.
to
be_kind_of
Gitlab
::
Git
::
DiffCollection
}
it
{
is_expected
.
to
be_kind_of
Gitlab
::
Git
::
DiffCollection
}
...
@@ -381,7 +381,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
...
@@ -381,7 +381,7 @@ describe Gitlab::Git::Commit, seed_helper: true do
it
{
expect
(
subject
.
first
).
to
be_kind_of
Gitlab
::
Git
::
Diff
}
it
{
expect
(
subject
.
first
).
to
be_kind_of
Gitlab
::
Git
::
Diff
}
end
end
describe
:ref_names
do
describe
'#ref_names'
do
let
(
:commit
)
{
Gitlab
::
Git
::
Commit
.
find
(
repository
,
'master'
)
}
let
(
:commit
)
{
Gitlab
::
Git
::
Commit
.
find
(
repository
,
'master'
)
}
subject
{
commit
.
ref_names
(
repository
)
}
subject
{
commit
.
ref_names
(
repository
)
}
...
...
spec/lib/gitlab/git/compare_spec.rb
View file @
def164e7
...
@@ -5,7 +5,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
...
@@ -5,7 +5,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
let
(
:compare
)
{
Gitlab
::
Git
::
Compare
.
new
(
repository
,
SeedRepo
::
BigCommit
::
ID
,
SeedRepo
::
Commit
::
ID
,
false
)
}
let
(
:compare
)
{
Gitlab
::
Git
::
Compare
.
new
(
repository
,
SeedRepo
::
BigCommit
::
ID
,
SeedRepo
::
Commit
::
ID
,
false
)
}
let
(
:compare_straight
)
{
Gitlab
::
Git
::
Compare
.
new
(
repository
,
SeedRepo
::
BigCommit
::
ID
,
SeedRepo
::
Commit
::
ID
,
true
)
}
let
(
:compare_straight
)
{
Gitlab
::
Git
::
Compare
.
new
(
repository
,
SeedRepo
::
BigCommit
::
ID
,
SeedRepo
::
Commit
::
ID
,
true
)
}
describe
:commits
do
describe
'#commits'
do
subject
do
subject
do
compare
.
commits
.
map
(
&
:id
)
compare
.
commits
.
map
(
&
:id
)
end
end
...
@@ -42,7 +42,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
...
@@ -42,7 +42,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
end
end
end
end
describe
:diffs
do
describe
'#diffs'
do
subject
do
subject
do
compare
.
diffs
.
map
(
&
:new_path
)
compare
.
diffs
.
map
(
&
:new_path
)
end
end
...
@@ -67,7 +67,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
...
@@ -67,7 +67,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
end
end
end
end
describe
:same
do
describe
'#same'
do
subject
do
subject
do
compare
.
same
compare
.
same
end
end
...
@@ -81,7 +81,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
...
@@ -81,7 +81,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
end
end
end
end
describe
:commits_straight
do
describe
'#commits'
,
'straight compare'
do
subject
do
subject
do
compare_straight
.
commits
.
map
(
&
:id
)
compare_straight
.
commits
.
map
(
&
:id
)
end
end
...
@@ -94,7 +94,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
...
@@ -94,7 +94,7 @@ describe Gitlab::Git::Compare, seed_helper: true do
it
{
is_expected
.
not_to
include
(
SeedRepo
::
BigCommit
::
PARENT_ID
)
}
it
{
is_expected
.
not_to
include
(
SeedRepo
::
BigCommit
::
PARENT_ID
)
}
end
end
describe
:diffs_straight
do
describe
'#diffs'
,
'straight compare'
do
subject
do
subject
do
compare_straight
.
diffs
.
map
(
&
:new_path
)
compare_straight
.
diffs
.
map
(
&
:new_path
)
end
end
...
...
spec/lib/gitlab/git/diff_collection_spec.rb
View file @
def164e7
...
@@ -24,7 +24,7 @@ describe Gitlab::Git::DiffCollection, seed_helper: true do
...
@@ -24,7 +24,7 @@ describe Gitlab::Git::DiffCollection, seed_helper: true do
it
{
is_expected
.
to
be_kind_of
::
Array
}
it
{
is_expected
.
to
be_kind_of
::
Array
}
end
end
describe
:decorate!
do
describe
'#decorate!'
do
let
(
:file_count
)
{
3
}
let
(
:file_count
)
{
3
}
it
'modifies the array in place'
do
it
'modifies the array in place'
do
...
@@ -302,7 +302,7 @@ describe Gitlab::Git::DiffCollection, seed_helper: true do
...
@@ -302,7 +302,7 @@ describe Gitlab::Git::DiffCollection, seed_helper: true do
end
end
end
end
describe
:each
do
describe
'#each'
do
context
'when diff are too large'
do
context
'when diff are too large'
do
let
(
:collection
)
do
let
(
:collection
)
do
Gitlab
::
Git
::
DiffCollection
.
new
([{
diff:
'a'
*
204800
}])
Gitlab
::
Git
::
DiffCollection
.
new
([{
diff:
'a'
*
204800
}])
...
...
spec/lib/gitlab/git/tree_spec.rb
View file @
def164e7
...
@@ -11,7 +11,7 @@ describe Gitlab::Git::Tree, seed_helper: true do
...
@@ -11,7 +11,7 @@ describe Gitlab::Git::Tree, seed_helper: true do
it
{
expect
(
tree
.
select
(
&
:file?
).
size
).
to
eq
(
10
)
}
it
{
expect
(
tree
.
select
(
&
:file?
).
size
).
to
eq
(
10
)
}
it
{
expect
(
tree
.
select
(
&
:submodule?
).
size
).
to
eq
(
2
)
}
it
{
expect
(
tree
.
select
(
&
:submodule?
).
size
).
to
eq
(
2
)
}
describe
:dir
do
describe
'#dir?'
do
let
(
:dir
)
{
tree
.
select
(
&
:dir?
).
first
}
let
(
:dir
)
{
tree
.
select
(
&
:dir?
).
first
}
it
{
expect
(
dir
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
dir
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
...
@@ -41,7 +41,7 @@ describe Gitlab::Git::Tree, seed_helper: true do
...
@@ -41,7 +41,7 @@ describe Gitlab::Git::Tree, seed_helper: true do
end
end
end
end
describe
:file
do
describe
'#file?'
do
let
(
:file
)
{
tree
.
select
(
&
:file?
).
first
}
let
(
:file
)
{
tree
.
select
(
&
:file?
).
first
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
...
@@ -50,21 +50,21 @@ describe Gitlab::Git::Tree, seed_helper: true do
...
@@ -50,21 +50,21 @@ describe Gitlab::Git::Tree, seed_helper: true do
it
{
expect
(
file
.
name
).
to
eq
(
'.gitignore'
)
}
it
{
expect
(
file
.
name
).
to
eq
(
'.gitignore'
)
}
end
end
describe
:readme
do
describe
'#readme?'
do
let
(
:file
)
{
tree
.
select
(
&
:readme?
).
first
}
let
(
:file
)
{
tree
.
select
(
&
:readme?
).
first
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
file
.
name
).
to
eq
(
'README.md'
)
}
it
{
expect
(
file
.
name
).
to
eq
(
'README.md'
)
}
end
end
describe
:contributing
do
describe
'#contributing?'
do
let
(
:file
)
{
tree
.
select
(
&
:contributing?
).
first
}
let
(
:file
)
{
tree
.
select
(
&
:contributing?
).
first
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
file
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
file
.
name
).
to
eq
(
'CONTRIBUTING.md'
)
}
it
{
expect
(
file
.
name
).
to
eq
(
'CONTRIBUTING.md'
)
}
end
end
describe
:submodule
do
describe
'#submodule?'
do
let
(
:submodule
)
{
tree
.
select
(
&
:submodule?
).
first
}
let
(
:submodule
)
{
tree
.
select
(
&
:submodule?
).
first
}
it
{
expect
(
submodule
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
it
{
expect
(
submodule
).
to
be_kind_of
Gitlab
::
Git
::
Tree
}
...
...
spec/lib/gitlab/git/util_spec.rb
View file @
def164e7
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Git
::
Util
do
describe
Gitlab
::
Git
::
Util
do
describe
:count_lines
do
describe
'#count_lines'
do
[
[
[
""
,
0
],
[
""
,
0
],
[
"foo"
,
1
],
[
"foo"
,
1
],
...
...
spec/lib/gitlab/ldap/user_spec.rb
View file @
def164e7
...
@@ -57,7 +57,7 @@ describe Gitlab::LDAP::User, lib: true do
...
@@ -57,7 +57,7 @@ describe Gitlab::LDAP::User, lib: true do
end
end
end
end
describe
:find_or_create
do
describe
'find or create'
do
it
"finds the user if already existing"
do
it
"finds the user if already existing"
do
create
(
:omniauth_user
,
extern_uid:
'my-uid'
,
provider:
'ldapmain'
)
create
(
:omniauth_user
,
extern_uid:
'my-uid'
,
provider:
'ldapmain'
)
...
...
spec/models/milestone_spec.rb
View file @
def164e7
...
@@ -109,7 +109,7 @@ describe Milestone, models: true do
...
@@ -109,7 +109,7 @@ describe Milestone, models: true do
it
{
expect
(
milestone
.
percent_complete
(
user
)).
to
eq
(
75
)
}
it
{
expect
(
milestone
.
percent_complete
(
user
)).
to
eq
(
75
)
}
end
end
describe
:items_count
do
describe
'#is_empty?'
do
before
do
before
do
milestone
.
issues
<<
create
(
:issue
,
project:
project
)
milestone
.
issues
<<
create
(
:issue
,
project:
project
)
milestone
.
issues
<<
create
(
:closed_issue
,
project:
project
)
milestone
.
issues
<<
create
(
:closed_issue
,
project:
project
)
...
...
spec/models/namespace_spec.rb
View file @
def164e7
...
@@ -163,7 +163,7 @@ describe Namespace, models: true do
...
@@ -163,7 +163,7 @@ describe Namespace, models: true do
end
end
end
end
describe
:rm_dir
do
describe
'#rm_dir'
,
'callback'
do
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
namespace
)
}
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
namespace
)
}
let!
(
:path
)
{
File
.
join
(
Gitlab
.
config
.
repositories
.
storages
.
default
[
'path'
],
namespace
.
full_path
)
}
let!
(
:path
)
{
File
.
join
(
Gitlab
.
config
.
repositories
.
storages
.
default
[
'path'
],
namespace
.
full_path
)
}
...
...
spec/models/pages_domain_spec.rb
View file @
def164e7
...
@@ -5,7 +5,7 @@ describe PagesDomain, models: true do
...
@@ -5,7 +5,7 @@ describe PagesDomain, models: true do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
end
describe
:validate_domain
do
describe
'validate domain'
do
subject
{
build
(
:pages_domain
,
domain:
domain
)
}
subject
{
build
(
:pages_domain
,
domain:
domain
)
}
context
'is unique'
do
context
'is unique'
do
...
@@ -75,7 +75,7 @@ describe PagesDomain, models: true do
...
@@ -75,7 +75,7 @@ describe PagesDomain, models: true do
end
end
end
end
describe
:url
do
describe
'#url'
do
subject
{
domain
.
url
}
subject
{
domain
.
url
}
context
'without the certificate'
do
context
'without the certificate'
do
...
@@ -91,7 +91,7 @@ describe PagesDomain, models: true do
...
@@ -91,7 +91,7 @@ describe PagesDomain, models: true do
end
end
end
end
describe
:has_matching_key?
do
describe
'#has_matching_key?'
do
subject
{
domain
.
has_matching_key?
}
subject
{
domain
.
has_matching_key?
}
context
'for matching key'
do
context
'for matching key'
do
...
@@ -107,7 +107,7 @@ describe PagesDomain, models: true do
...
@@ -107,7 +107,7 @@ describe PagesDomain, models: true do
end
end
end
end
describe
:has_intermediates?
do
describe
'#has_intermediates?'
do
subject
{
domain
.
has_intermediates?
}
subject
{
domain
.
has_intermediates?
}
context
'for self signed'
do
context
'for self signed'
do
...
@@ -133,7 +133,7 @@ describe PagesDomain, models: true do
...
@@ -133,7 +133,7 @@ describe PagesDomain, models: true do
end
end
end
end
describe
:expired?
do
describe
'#expired?'
do
subject
{
domain
.
expired?
}
subject
{
domain
.
expired?
}
context
'for valid'
do
context
'for valid'
do
...
@@ -149,7 +149,7 @@ describe PagesDomain, models: true do
...
@@ -149,7 +149,7 @@ describe PagesDomain, models: true do
end
end
end
end
describe
:subject
do
describe
'#subject'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
subject
{
domain
.
subject
}
subject
{
domain
.
subject
}
...
@@ -157,7 +157,7 @@ describe PagesDomain, models: true do
...
@@ -157,7 +157,7 @@ describe PagesDomain, models: true do
it
{
is_expected
.
to
eq
(
'/CN=test-certificate'
)
}
it
{
is_expected
.
to
eq
(
'/CN=test-certificate'
)
}
end
end
describe
:certificate_text
do
describe
'#certificate_text'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
subject
{
domain
.
certificate_text
}
subject
{
domain
.
certificate_text
}
...
...
spec/models/repository_spec.rb
View file @
def164e7
...
@@ -1083,7 +1083,7 @@ describe Repository, models: true do
...
@@ -1083,7 +1083,7 @@ describe Repository, models: true do
end
end
end
end
describe
:skip_merged_commit
do
describe
'skip_merges option'
do
subject
{
repository
.
commits
(
Gitlab
::
Git
::
BRANCH_REF_PREFIX
+
"'test'"
,
limit:
100
,
skip_merges:
true
).
map
{
|
k
|
k
.
id
}
}
subject
{
repository
.
commits
(
Gitlab
::
Git
::
BRANCH_REF_PREFIX
+
"'test'"
,
limit:
100
,
skip_merges:
true
).
map
{
|
k
|
k
.
id
}
}
it
{
is_expected
.
not_to
include
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
it
{
is_expected
.
not_to
include
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
...
...
spec/requests/api/projects_spec.rb
View file @
def164e7
...
@@ -902,7 +902,7 @@ describe API::Projects, :api do
...
@@ -902,7 +902,7 @@ describe API::Projects, :api do
end
end
end
end
describe
:fork_admin
do
describe
'fork management'
do
let
(
:project_fork_target
)
{
create
(
:empty_project
)
}
let
(
:project_fork_target
)
{
create
(
:empty_project
)
}
let
(
:project_fork_source
)
{
create
(
:empty_project
,
:public
)
}
let
(
:project_fork_source
)
{
create
(
:empty_project
,
:public
)
}
...
...
spec/requests/api/v3/projects_spec.rb
View file @
def164e7
...
@@ -949,7 +949,7 @@ describe API::V3::Projects, api: true do
...
@@ -949,7 +949,7 @@ describe API::V3::Projects, api: true do
end
end
end
end
describe
:fork_admin
do
describe
'fork management'
do
let
(
:project_fork_target
)
{
create
(
:empty_project
)
}
let
(
:project_fork_target
)
{
create
(
:empty_project
)
}
let
(
:project_fork_source
)
{
create
(
:empty_project
,
:public
)
}
let
(
:project_fork_source
)
{
create
(
:empty_project
,
:public
)
}
...
...
spec/services/milestones/close_service_spec.rb
View file @
def164e7
...
@@ -17,7 +17,7 @@ describe Milestones::CloseService, services: true do
...
@@ -17,7 +17,7 @@ describe Milestones::CloseService, services: true do
it
{
expect
(
milestone
).
to
be_valid
}
it
{
expect
(
milestone
).
to
be_valid
}
it
{
expect
(
milestone
).
to
be_closed
}
it
{
expect
(
milestone
).
to
be_closed
}
describe
:event
do
describe
'event'
do
let
(
:event
)
{
Event
.
recent
.
first
}
let
(
:event
)
{
Event
.
recent
.
first
}
it
{
expect
(
event
.
milestone
).
to
be_truthy
}
it
{
expect
(
event
.
milestone
).
to
be_truthy
}
...
...
spec/services/projects/fork_service_spec.rb
View file @
def164e7
require
'spec_helper'
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_namespace
=
create
(
:namespace
)
@from_user
=
create
(
:user
,
namespace:
@from_namespace
)
@from_user
=
create
(
:user
,
namespace:
@from_namespace
)
...
@@ -100,7 +100,7 @@ describe Projects::ForkService, services: true do
...
@@ -100,7 +100,7 @@ describe Projects::ForkService, services: true do
end
end
end
end
describe
:fork_to_namespace
do
describe
'fork to namespace'
do
before
do
before
do
@group_owner
=
create
(
:user
)
@group_owner
=
create
(
:user
)
@developer
=
create
(
:user
)
@developer
=
create
(
:user
)
...
...
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