Commit 1b7b9adb authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette
Browse files

fix bugs: Wrong expected kind_of on CommunityResourceSpec

parent d7f58b19
...@@ -23,7 +23,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do ...@@ -23,7 +23,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a new top-level community' 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(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
end end
...@@ -49,7 +49,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do ...@@ -49,7 +49,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a sub-community' 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(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
end end
...@@ -61,7 +61,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do ...@@ -61,7 +61,7 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
it 'create a collection' 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(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
end end
...@@ -78,4 +78,4 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do ...@@ -78,4 +78,4 @@ RSpec.describe Dspace::Resources::CommunityResource, resource_kit: true do
end end
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