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
0aadf36b
Commit
0aadf36b
authored
Sep 01, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore with_branch cache spec
parent
ee1aede5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+18
-0
No files found.
spec/models/repository_spec.rb
View file @
0aadf36b
...
@@ -1068,6 +1068,24 @@ describe Repository, models: true do
...
@@ -1068,6 +1068,24 @@ describe Repository, models: true do
end
end
end
end
context
'when target branch is different from source branch'
do
before
do
allow_any_instance_of
(
Gitlab
::
Git
::
Hook
).
to
receive
(
:trigger
).
and_return
([
true
,
''
])
end
it
'expires branch cache'
do
expect
(
repository
).
not_to
receive
(
:expire_exists_cache
)
expect
(
repository
).
not_to
receive
(
:expire_root_ref_cache
)
expect
(
repository
).
not_to
receive
(
:expire_emptiness_caches
)
expect
(
repository
).
to
receive
(
:expire_branches_cache
)
repository
.
with_branch
(
user
,
'new-feature'
)
do
new_rev
end
end
end
context
'when repository is empty'
do
context
'when repository is empty'
do
before
do
before
do
allow_any_instance_of
(
Gitlab
::
Git
::
Hook
).
to
receive
(
:trigger
).
and_return
([
true
,
''
])
allow_any_instance_of
(
Gitlab
::
Git
::
Hook
).
to
receive
(
:trigger
).
and_return
([
true
,
''
])
...
...
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