Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
portalmec
Commits
94ec92a5
Commit
94ec92a5
authored
8 years ago
by
Bernardo Chagas
Browse files
Options
Downloads
Patches
Plain Diff
Add 'user delete collection' tests
parent
2b527578
No related branches found
No related tags found
1 merge request
!319
Change destroy method, only owner user can destroy collection
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/controllers/v1/collections_controller_test.rb
+12
-0
12 additions, 0 deletions
test/controllers/v1/collections_controller_test.rb
with
12 additions
and
0 deletions
test/controllers/v1/collections_controller_test.rb
+
12
−
0
View file @
94ec92a5
...
...
@@ -36,6 +36,18 @@ class V1::CollectionsControllerTest < ActionController::TestCase
assert_response
:unauthorized
end
test
'should user deleting collection to destroy and return :ok'
do
auth_request
users
(
:jack
)
delete
:destroy
,
id:
collections
(
:ufpr
).
id
assert_response
:ok
end
test
'should user deleting collection to destroy and return :unauthorized'
do
delete
:destroy
,
id:
collections
(
:ufpr
).
id
assert_response
:unauthorized
end
test
'should user tagging a collection'
do
auth_request
users
(
:jack
)
tag
=
tags
(
:tag_three
).
name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment