samvera / hydra-pcdm

Samvera implementation of the PCDM model
Other
11 stars 10 forks source link

obj.members should not allow an ActiveFedora::Base to be a member #143

Closed elrayle closed 9 years ago

elrayle commented 9 years ago

The following should raise NoMethodError, but it raises nothing.

        expect { @object101.members = [@af_base_object] }.to raise_error(error_type,error_message)

See object_spec.rb around line 246, test it 'should NOT aggregate AF::Base objects in objects aggregation' .

elrayle commented 9 years ago

Is this fixed?

tpendragon commented 9 years ago

The test is green and not marked pending, so it should be!

tpendragon commented 9 years ago

I think I was looking at the wrong test.

jcoyne commented 9 years ago

Can someone explain this behavior to me? If it should exclude objects that extend from ActiveFedora::Base, what else is left?

jcoyne commented 9 years ago

Should it say "It excludes objects that are not PCDM::Objects?"

tpendragon commented 9 years ago

@jcoyne I think the validation is "if you add something it should respond to pcdm_object?/pcdm_collection?

tpendragon commented 9 years ago

Should it say "It excludes objects that are not PCDM::Objects?"

:+1:

Edit: Well, sorta :+1:. Collections too.