Commit 9690481e authored by Lucas Ernesto Kindinger's avatar Lucas Ernesto Kindinger
Browse files

Added delete communinity tests

parent 02638572
......@@ -27,6 +27,12 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
end
end
it 'delete community' do
expect(resource).to have_action(:delete).that_handles(200, 201, 204).at_path('/rest/communities/:id').with_verb(:delete) do |handled|
expect(handled).to eq(true)
end
end
context "with community scope" do
it "get collections" do
......@@ -59,5 +65,17 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
end
end
it 'delete collection' do
expect(resource).to have_action(:delete_collection).that_handles(200, 201, 204).at_path('/rest/communities/:id/collections/:collection_id').with_verb(:delete) do |handled|
expect(handled).to eq(true)
end
end
it 'delete sub-community' do
expect(resource).to have_action(:delete_subcommunity).that_handles(200, 201, 204).at_path('/rest/communities/:id/communities/:subcommunity_id').with_verb(:delete) do |handled|
expect(handled).to eq(true)
end
end
end
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment