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
3a4da8ce
Commit
3a4da8ce
authored
Aug 28, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
081e2fce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
app/models/repository.rb
app/models/repository.rb
+3
-3
spec/models/project_spec.rb
spec/models/project_spec.rb
+5
-5
No files found.
app/models/repository.rb
View file @
3a4da8ce
require
'securerandom'
require
'securerandom'
class
Repository
class
Repository
REF_MERGE_REQUEST
=
'merge-requests'
REF_MERGE_REQUEST
=
'merge-requests'
.
freeze
REF_KEEP_AROUND
=
'keep-around'
REF_KEEP_AROUND
=
'keep-around'
.
freeze
REF_ENVIRONMENTS
=
'environments'
REF_ENVIRONMENTS
=
'environments'
.
freeze
RESERVED_REFS_NAMES
=
%W[
RESERVED_REFS_NAMES
=
%W[
heads
heads
...
...
spec/models/project_spec.rb
View file @
3a4da8ce
...
@@ -1563,14 +1563,14 @@ describe Project do
...
@@ -1563,14 +1563,14 @@ describe Project do
describe
'project import state transitions'
do
describe
'project import state transitions'
do
context
'state transition: [:started] => [:finished]'
do
context
'state transition: [:started] => [:finished]'
do
let
(
:
housecleaning_service
)
{
spy
(
:housecleaning
_service
)
}
let
(
:
after_import_service
)
{
spy
(
:after_import
_service
)
}
let
(
:housekeeping_service
)
{
spy
(
:housekeeping_service
)
}
let
(
:housekeeping_service
)
{
spy
(
:housekeeping_service
)
}
before
do
before
do
allow
(
Projects
::
Housecleaning
Service
)
allow
(
Projects
::
AfterImport
Service
)
.
to
receive
(
:new
)
{
housecleaning
_service
}
.
to
receive
(
:new
)
{
after_import
_service
}
allow
(
housecleaning
_service
)
allow
(
after_import
_service
)
.
to
receive
(
:execute
)
{
housekeeping_service
.
execute
}
.
to
receive
(
:execute
)
{
housekeeping_service
.
execute
}
allow
(
Projects
::
HousekeepingService
)
allow
(
Projects
::
HousekeepingService
)
...
@@ -1589,7 +1589,7 @@ describe Project do
...
@@ -1589,7 +1589,7 @@ describe Project do
project
.
import_finish
project
.
import_finish
expect
(
housecleaning
_service
).
to
have_received
(
:execute
)
expect
(
after_import
_service
).
to
have_received
(
:execute
)
expect
(
housekeeping_service
).
to
have_received
(
:execute
)
expect
(
housekeeping_service
).
to
have_received
(
:execute
)
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