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
b9cb49ad
Commit
b9cb49ad
authored
Jun 03, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move specs to ce directory
parent
985388b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
spec/controllers/groups_controller_spec.rb
spec/controllers/groups_controller_spec.rb
+22
-0
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+12
-0
No files found.
spec/controllers/groups_controller_spec.rb
View file @
b9cb49ad
...
...
@@ -141,6 +141,28 @@ describe GroupsController do
end
describe
'POST #create'
do
it
'allows creating a group'
do
sign_in
(
user
)
expect
do
post
:create
,
params:
{
group:
{
name:
'new_group'
,
path:
"new_group"
}
}
end
.
to
change
{
Group
.
count
}.
by
(
1
)
expect
(
response
).
to
have_gitlab_http_status
(
302
)
end
context
'authorization'
do
it
'allows an admin to create a group'
do
sign_in
(
create
(
:admin
))
expect
do
post
:create
,
params:
{
group:
{
name:
'new_group'
,
path:
"new_group"
}
}
end
.
to
change
{
Group
.
count
}.
by
(
1
)
expect
(
response
).
to
have_gitlab_http_status
(
302
)
end
end
context
'when creating subgroups'
,
:nested_groups
do
[
true
,
false
].
each
do
|
can_create_group_status
|
context
"and can_create_group is
#{
can_create_group_status
}
"
do
...
...
spec/controllers/projects_controller_spec.rb
View file @
b9cb49ad
...
...
@@ -292,6 +292,18 @@ describe ProjectsController do
end
describe
'GET edit'
do
it
'allows an admin user to access the page'
do
sign_in
(
create
(
:user
,
:admin
))
get
:edit
,
params:
{
namespace_id:
project
.
namespace
.
path
,
id:
project
.
path
}
expect
(
response
).
to
have_gitlab_http_status
(
200
)
end
it
'sets the badge API endpoint'
do
sign_in
(
user
)
project
.
add_maintainer
(
user
)
...
...
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