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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
28da2a8b
Commit
28da2a8b
authored
Feb 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monkeypatch satellite call for merge request in tests
parent
42ce2c10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+2
-0
spec/support/stubbed_repository.rb
spec/support/stubbed_repository.rb
+7
-0
No files found.
app/controllers/merge_requests_controller.rb
View file @
28da2a8b
require
'gitlab/satellite/satellite'
class
MergeRequestsController
<
ProjectResourceController
class
MergeRequestsController
<
ProjectResourceController
before_filter
:module_enabled
before_filter
:module_enabled
before_filter
:merge_request
,
only:
[
:edit
,
:update
,
:show
,
:commits
,
:diffs
,
:automerge
,
:automerge_check
,
:ci_status
]
before_filter
:merge_request
,
only:
[
:edit
,
:update
,
:show
,
:commits
,
:diffs
,
:automerge
,
:automerge_check
,
:ci_status
]
...
...
spec/support/stubbed_repository.rb
View file @
28da2a8b
require
"repository"
require
"repository"
require
"project"
require
"project"
require
"merge_request"
require
"shell"
require
"shell"
# Stubs out all Git repository access done by models so that specs can run
# Stubs out all Git repository access done by models so that specs can run
...
@@ -32,6 +33,12 @@ class Project
...
@@ -32,6 +33,12 @@ class Project
end
end
end
end
class
MergeRequest
def
can_be_merged
true
end
end
class
GitLabTestRepo
<
Repository
class
GitLabTestRepo
<
Repository
def
repo
def
repo
@repo
||=
Grit
::
Repo
.
new
(
Rails
.
root
.
join
(
'tmp'
,
'repositories'
,
'gitlabhq'
))
@repo
||=
Grit
::
Repo
.
new
(
Rails
.
root
.
join
(
'tmp'
,
'repositories'
,
'gitlabhq'
))
...
...
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