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
2f60a402
Commit
2f60a402
authored
May 02, 2017
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove stubbing from Gitlab::GitalyClient::Commit specs
Closes gitaly#198
parent
34cd1097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
spec/lib/gitlab/gitaly_client/commit_spec.rb
spec/lib/gitlab/gitaly_client/commit_spec.rb
+3
-8
No files found.
spec/lib/gitlab/gitaly_client/commit_spec.rb
View file @
2f60a402
...
@@ -7,11 +7,6 @@ describe Gitlab::GitalyClient::Commit do
...
@@ -7,11 +7,6 @@ describe Gitlab::GitalyClient::Commit do
let
(
:repository_message
)
{
project
.
repository
.
gitaly_repository
}
let
(
:repository_message
)
{
project
.
repository
.
gitaly_repository
}
let
(
:commit
)
{
project
.
commit
(
'913c66a37b4a45b9769037c55c2d238bd0942d2e'
)
}
let
(
:commit
)
{
project
.
commit
(
'913c66a37b4a45b9769037c55c2d238bd0942d2e'
)
}
before
do
allow
(
Gitaly
::
Diff
::
Stub
).
to
receive
(
:new
).
and_return
(
diff_stub
)
allow
(
diff_stub
).
to
receive
(
:commit_diff
).
and_return
([])
end
context
'when a commit has a parent'
do
context
'when a commit has a parent'
do
it
'sends an RPC request with the parent ID as left commit'
do
it
'sends an RPC request with the parent ID as left commit'
do
request
=
Gitaly
::
CommitDiffRequest
.
new
(
request
=
Gitaly
::
CommitDiffRequest
.
new
(
...
@@ -20,7 +15,7 @@ describe Gitlab::GitalyClient::Commit do
...
@@ -20,7 +15,7 @@ describe Gitlab::GitalyClient::Commit do
right_commit_id:
commit
.
id
,
right_commit_id:
commit
.
id
,
)
)
expect
(
diff_s
tub
).
to
receive
(
:commit_diff
).
with
(
request
)
expect
_any_instance_of
(
Gitaly
::
Diff
::
S
tub
).
to
receive
(
:commit_diff
).
with
(
request
)
described_class
.
diff_from_parent
(
commit
)
described_class
.
diff_from_parent
(
commit
)
end
end
...
@@ -35,7 +30,7 @@ describe Gitlab::GitalyClient::Commit do
...
@@ -35,7 +30,7 @@ describe Gitlab::GitalyClient::Commit do
right_commit_id:
initial_commit
.
id
,
right_commit_id:
initial_commit
.
id
,
)
)
expect
(
diff_s
tub
).
to
receive
(
:commit_diff
).
with
(
request
)
expect
_any_instance_of
(
Gitaly
::
Diff
::
S
tub
).
to
receive
(
:commit_diff
).
with
(
request
)
described_class
.
diff_from_parent
(
initial_commit
)
described_class
.
diff_from_parent
(
initial_commit
)
end
end
...
@@ -50,7 +45,7 @@ describe Gitlab::GitalyClient::Commit do
...
@@ -50,7 +45,7 @@ describe Gitlab::GitalyClient::Commit do
it
'passes options to Gitlab::Git::DiffCollection'
do
it
'passes options to Gitlab::Git::DiffCollection'
do
options
=
{
max_files:
31
,
max_lines:
13
}
options
=
{
max_files:
31
,
max_lines:
13
}
expect
(
Gitlab
::
Git
::
DiffCollection
).
to
receive
(
:new
).
with
(
[]
,
options
)
expect
(
Gitlab
::
Git
::
DiffCollection
).
to
receive
(
:new
).
with
(
kind_of
(
Enumerable
)
,
options
)
described_class
.
diff_from_parent
(
commit
,
options
)
described_class
.
diff_from_parent
(
commit
,
options
)
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