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
f2a1bd6c
Commit
f2a1bd6c
authored
Apr 24, 2018
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the push_to_empty_repo to the user_access spec
parent
742dd303
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
ee/spec/lib/gitlab/user_access_spec.rb
ee/spec/lib/gitlab/user_access_spec.rb
+21
-0
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+0
-11
No files found.
ee/spec/lib/gitlab/user_access_spec.rb
0 → 100644
View file @
f2a1bd6c
require
'spec_helper'
describe
Gitlab
::
UserAccess
do
include
ExternalAuthorizationServiceHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:access
)
{
described_class
.
new
(
user
,
project:
project
)
}
describe
'#can_push_to_branch?'
do
describe
'push to empty project'
do
let
(
:project
)
{
create
(
:project_empty_repo
)
}
it
'returns false when the external service denies access'
do
project
.
add_master
(
user
)
external_service_deny_access
(
user
,
project
)
expect
(
access
.
can_push_to_branch?
(
'master'
)).
to
be_falsey
end
end
end
end
ee/spec/models/project_spec.rb
View file @
f2a1bd6c
...
@@ -1310,17 +1310,6 @@ describe Project do
...
@@ -1310,17 +1310,6 @@ describe Project do
end
end
end
end
describe
'#user_can_push_to_empty_repo?'
do
it
'returns false when the external service denies access'
do
user
=
create
(
:user
)
project
=
create
(
:project
)
project
.
add_master
(
user
)
external_service_deny_access
(
user
,
project
)
expect
(
project
.
user_can_push_to_empty_repo?
(
user
)).
to
be_falsey
end
end
describe
'project import state transitions'
do
describe
'project import state transitions'
do
context
'state transition: [:started] => [:finished]'
do
context
'state transition: [:started] => [:finished]'
do
context
'elasticsearch indexing disabled'
do
context
'elasticsearch indexing disabled'
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