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
592eb9a7
Commit
592eb9a7
authored
Jul 01, 2021
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve spec/lib/gitlab/git_access_snippet_spec spec
parent
65d333c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
spec/lib/gitlab/git_access_snippet_spec.rb
spec/lib/gitlab/git_access_snippet_spec.rb
+5
-7
No files found.
spec/lib/gitlab/git_access_snippet_spec.rb
View file @
592eb9a7
...
...
@@ -140,8 +140,6 @@ RSpec.describe Gitlab::GitAccessSnippet do
end
context
'when project is public but snippet feature is private'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
before
do
update_feature_access_level
(
project
,
:private
)
end
...
...
@@ -151,7 +149,7 @@ RSpec.describe Gitlab::GitAccessSnippet do
end
context
'when project is not accessible'
do
let
(
:project
)
{
create
(
:project
,
:private
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
[
:anonymous
,
:non_member
].
each
do
|
membership
|
context
membership
.
to_s
do
...
...
@@ -168,7 +166,7 @@ RSpec.describe Gitlab::GitAccessSnippet do
end
context
'when project is archived'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:archived
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:public
,
:archived
)
}
[
:anonymous
,
:non_member
].
each
do
|
membership
|
context
membership
.
to_s
do
...
...
@@ -214,7 +212,7 @@ RSpec.describe Gitlab::GitAccessSnippet do
end
context
'when snippet feature is disabled'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:snippets_disabled
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:public
,
:snippets_disabled
)
}
[
:anonymous
,
:non_member
,
:author
,
:admin
].
each
do
|
membership
|
context
membership
.
to_s
do
...
...
@@ -306,9 +304,9 @@ RSpec.describe Gitlab::GitAccessSnippet do
end
describe
'repository size restrictions'
do
let
(
:snippet
)
{
create
(
:personal_snippet
,
:public
,
:repository
)
}
let
(
:actor
)
{
snippet
.
author
}
let_it_be
(
:snippet
)
{
create
(
:personal_snippet
,
:public
,
:repository
)
}
let
(
:actor
)
{
snippet
.
author
}
let
(
:oldrev
)
{
TestEnv
::
BRANCH_SHA
[
"snippet/single-file"
]
}
let
(
:newrev
)
{
TestEnv
::
BRANCH_SHA
[
"snippet/edit-file"
]
}
let
(
:ref
)
{
"refs/heads/snippet/edit-file"
}
...
...
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