Commit 66f1835e authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette

fix: Expected return is an object, not only true

parent 948d9677
......@@ -23,7 +23,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a new top-level community' do
expect(resource).to have_action(:create).that_handles(200, 201).at_path('/rest/communities').with_verb(:post) do |handled|
expect(handled).to eq(true)
expect(handled).to be_kind_of(Dspace::Community)
end
end
......@@ -49,7 +49,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a sub-community' do
expect(resource).to have_action(:create_subcommunity).that_handles(200, 201).at_path('/rest/communities/:id/communities').with_verb(:post) do |handled|
expect(handled).to eq(true)
expect(handled).to be_kind_of(Dspace::Community)
end
end
......@@ -61,7 +61,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a collection' do
expect(resource).to have_action(:create_collection).that_handles(200, 201).at_path('/rest/communities/:id/collections').with_verb(:post) do |handled|
expect(handled).to eq(true)
expect(handled).to be_kind_of(Dspace::Collection)
end
end
......@@ -78,4 +78,4 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
end
end
end
\ No newline at end of file
end
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