BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a85eed64
Commit
a85eed64
authored
Aug 09, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fake out Repository#fetch_ref for merge request if
the project didn't have a repository setup. We don't try to stub it if the repository was already there.
parent
029fb98b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
merge_requests.rb
spec/factories/merge_requests.rb
+10
-0
task_lists_spec.rb
spec/features/task_lists_spec.rb
+2
-3
No files found.
spec/factories/merge_requests.rb
View file @
a85eed64
...
...
@@ -68,6 +68,16 @@ FactoryGirl.define do
merge_user
author
end
after
(
:build
)
do
|
merge_request
|
target_project
=
merge_request
.
target_project
# Fake `fetch_ref` if we don't have repository
# We have too many existing tests replying on this behaviour
unless
target_project
.
repository_exists?
allow
(
target_project
.
repository
).
to
receive
(
:fetch_ref
)
end
end
factory
:merged_merge_request
,
traits:
[
:merged
]
factory
:closed_merge_request
,
traits:
[
:closed
]
factory
:reopened_merge_request
,
traits:
[
:opened
]
...
...
spec/features/task_lists_spec.rb
View file @
a85eed64
...
...
@@ -52,8 +52,8 @@ feature 'Task Lists' do
before
do
Warden
.
test_mode!
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user2
,
:guest
]
project
.
add_master
(
user
)
project
.
add_guest
(
user2
)
login_as
(
user
)
end
...
...
@@ -246,7 +246,6 @@ feature 'Task Lists' do
end
describe
'multiple tasks'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
markdown
,
author:
user
,
source_project:
project
)
}
it
'renders for description'
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