Skip to content
Snippets Groups Projects
Commit 94ec92a5 authored by Bernardo Chagas's avatar Bernardo Chagas
Browse files

Add 'user delete collection' tests

parent 2b527578
No related branches found
No related tags found
1 merge request!319Change destroy method, only owner user can destroy collection
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment