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
cab51985
Commit
cab51985
authored
Feb 02, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs with new method signatures
parent
623dbc1f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
spec/lib/gitlab/checks/change_access_spec.rb
spec/lib/gitlab/checks/change_access_spec.rb
+2
-2
spec/lib/gitlab/elastic/search_results_spec.rb
spec/lib/gitlab/elastic/search_results_spec.rb
+6
-6
spec/lib/gitlab/git_access_spec.rb
spec/lib/gitlab/git_access_spec.rb
+2
-2
No files found.
spec/lib/gitlab/checks/change_access_spec.rb
View file @
cab51985
...
...
@@ -193,7 +193,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do
white_listed
.
each
do
|
file_path
|
old_rev
=
'be93687618e4b132087f430a4d8fc3a609c9b77c'
old_rev
=
new_rev
if
new_rev
new_rev
=
project
.
repository
.
commit_file
(
user
,
file_path
,
"commit
#{
file_path
}
"
,
"commit
#{
file_path
}
"
,
"master"
,
false
)
new_rev
=
project
.
repository
.
commit_file
(
user
,
file_path
,
"commit
#{
file_path
}
"
,
message:
"commit
#{
file_path
}
"
,
branch_name:
"master"
,
update:
false
)
allow
(
project
.
repository
).
to
receive
(
:new_commits
).
and_return
(
project
.
repository
.
commits_between
(
old_rev
,
new_rev
)
...
...
@@ -216,7 +216,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do
black_listed
.
each
do
|
file_path
|
old_rev
=
'be93687618e4b132087f430a4d8fc3a609c9b77c'
old_rev
=
new_rev
if
new_rev
new_rev
=
project
.
repository
.
commit_file
(
user
,
file_path
,
"commit
#{
file_path
}
"
,
"commit
#{
file_path
}
"
,
"master"
,
false
)
new_rev
=
project
.
repository
.
commit_file
(
user
,
file_path
,
"commit
#{
file_path
}
"
,
message:
"commit
#{
file_path
}
"
,
branch_name:
"master"
,
update:
false
)
allow
(
project
.
repository
).
to
receive
(
:new_commits
).
and_return
(
project
.
repository
.
commits_between
(
old_rev
,
new_rev
)
...
...
spec/lib/gitlab/elastic/search_results_spec.rb
View file @
cab51985
...
...
@@ -561,9 +561,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do
user
,
'test-file'
,
'search test'
,
'search test'
,
'master'
,
false
message:
'search test'
,
branch_name:
'master'
,
update:
false
)
project
.
repository
.
index_commits
...
...
@@ -594,9 +594,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do
user
,
'test-file'
,
'tesla'
,
'search test'
,
'master'
,
false
message:
'search test'
,
branch_name:
'master'
,
update:
false
)
project
.
repository
.
index_blobs
...
...
spec/lib/gitlab/git_access_spec.rb
View file @
cab51985
...
...
@@ -217,7 +217,7 @@ describe Gitlab::GitAccess, lib: true do
def
stub_git_hooks
# Running the `pre-receive` hook is expensive, and not necessary for this test.
allow_any_instance_of
(
GitHooksService
).
to
receive
(
:execute
).
and_yield
allow_any_instance_of
(
GitHooksService
).
to
receive
(
:execute
).
and_yield
(
GitHooksService
.
new
)
end
def
merge_into_protected_branch
...
...
@@ -225,7 +225,7 @@ describe Gitlab::GitAccess, lib: true do
stub_git_hooks
project
.
repository
.
add_branch
(
user
,
unprotected_branch
,
'feature'
)
target_branch
=
project
.
repository
.
lookup
(
'feature'
)
source_branch
=
project
.
repository
.
commit_file
(
user
,
FFaker
::
InternetSE
.
login_user_name
,
FFaker
::
HipsterIpsum
.
paragraph
,
FFaker
::
HipsterIpsum
.
sentence
,
unprotected_branch
,
false
)
source_branch
=
project
.
repository
.
commit_file
(
user
,
FFaker
::
InternetSE
.
login_user_name
,
FFaker
::
HipsterIpsum
.
paragraph
,
message:
FFaker
::
HipsterIpsum
.
sentence
,
branch_name:
unprotected_branch
,
update:
false
)
rugged
=
project
.
repository
.
rugged
author
=
{
email:
"email@example.com"
,
time:
Time
.
now
,
name:
"Example Git 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