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
7460c39f
Commit
7460c39f
authored
Jun 19, 2015
by
Robert Speicher
Committed by
Dmitriy Zaporozhets
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GitPushService spec
parent
2120e2dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+6
-4
No files found.
spec/services/git_push_service_spec.rb
View file @
7460c39f
...
@@ -124,8 +124,9 @@ describe GitPushService do
...
@@ -124,8 +124,9 @@ describe GitPushService do
end
end
it
"when pushing a branch for the first time with default branch protection disabled"
do
it
"when pushing a branch for the first time with default branch protection disabled"
do
allow_any_instance_of
(
ApplicationSetting
).
allow
(
ApplicationSetting
.
current_application_settings
).
to
receive
(
:default_branch_protection
).
and_return
(
0
)
to
receive
(
:default_branch_protection
).
and_return
(
Gitlab
::
Access
::
PROTECTION_NONE
)
expect
(
project
).
to
receive
(
:execute_hooks
)
expect
(
project
).
to
receive
(
:execute_hooks
)
expect
(
project
.
default_branch
).
to
eq
(
"master"
)
expect
(
project
.
default_branch
).
to
eq
(
"master"
)
...
@@ -134,8 +135,9 @@ describe GitPushService do
...
@@ -134,8 +135,9 @@ describe GitPushService do
end
end
it
"when pushing a branch for the first time with default branch protection set to 'developers can push'"
do
it
"when pushing a branch for the first time with default branch protection set to 'developers can push'"
do
allow_any_instance_of
(
ApplicationSetting
).
allow
(
ApplicationSetting
.
current_application_settings
).
to
receive
(
:default_branch_protection
).
and_return
(
1
)
to
receive
(
:default_branch_protection
).
and_return
(
Gitlab
::
Access
::
PROTECTION_DEV_CAN_PUSH
)
expect
(
project
).
to
receive
(
:execute_hooks
)
expect
(
project
).
to
receive
(
:execute_hooks
)
expect
(
project
.
default_branch
).
to
eq
(
"master"
)
expect
(
project
.
default_branch
).
to
eq
(
"master"
)
...
...
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