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
047fbf58
Commit
047fbf58
authored
Mar 22, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs due to @exists variable in Repository
parent
00ae67d5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+5
-0
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+5
-0
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+8
-1
No files found.
features/steps/dashboard/merge_requests.rb
View file @
047fbf58
...
@@ -112,5 +112,10 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
...
@@ -112,5 +112,10 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
def
forked_project
def
forked_project
@forked_project
||=
Projects
::
ForkService
.
new
(
public_project
,
current_user
).
execute
@forked_project
||=
Projects
::
ForkService
.
new
(
public_project
,
current_user
).
execute
# The call to project.repository.after_import in RepositoryForkWorker does
# not reset the @exists variable of @fork_project.repository so we have to
# explicitely call this method to clear the @exists variable.
@forked_project
.
repository
.
after_import
@forked_project
end
end
end
end
spec/services/merge_requests/refresh_service_spec.rb
View file @
047fbf58
...
@@ -13,6 +13,11 @@ describe MergeRequests::RefreshService, services: true do
...
@@ -13,6 +13,11 @@ describe MergeRequests::RefreshService, services: true do
@project
=
create
(
:project
,
namespace:
group
,
approvals_before_merge:
1
,
reset_approvals_on_push:
true
)
@project
=
create
(
:project
,
namespace:
group
,
approvals_before_merge:
1
,
reset_approvals_on_push:
true
)
@fork_project
=
Projects
::
ForkService
.
new
(
@project
,
@user
).
execute
@fork_project
=
Projects
::
ForkService
.
new
(
@project
,
@user
).
execute
# The call to project.repository.after_import in RepositoryForkWorker does
# not reset the @exists variable of @fork_project.repository so we have to
# explicitely call this method to clear the @exists variable.
@fork_project
.
repository
.
after_import
@merge_request
=
create
(
:merge_request
,
@merge_request
=
create
(
:merge_request
,
source_project:
@project
,
source_project:
@project
,
source_branch:
'master'
,
source_branch:
'master'
,
...
...
spec/services/system_note_service_spec.rb
View file @
047fbf58
...
@@ -439,7 +439,14 @@ describe SystemNoteService, services: true do
...
@@ -439,7 +439,14 @@ describe SystemNoteService, services: true do
context
'commit with cross-reference from fork'
do
context
'commit with cross-reference from fork'
do
let
(
:author2
)
{
create
(
:user
)
}
let
(
:author2
)
{
create
(
:user
)
}
let
(
:forked_project
)
{
Projects
::
ForkService
.
new
(
project
,
author2
).
execute
}
let
(
:forked_project
)
do
fp
=
Projects
::
ForkService
.
new
(
project
,
author2
).
execute
# The call to project.repository.after_import in RepositoryForkWorker does
# not reset the @exists variable of @fork_project.repository so we have to
# explicitely call this method to clear the @exists variable.
fp
.
repository
.
after_import
fp
end
let
(
:commit2
)
{
forked_project
.
commit
}
let
(
:commit2
)
{
forked_project
.
commit
}
before
do
before
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