Skip to content

Instantly share code, notes, and snippets.

@escowles
Last active August 4, 2020 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save escowles/1d6b446c13f77b5d778ae017d250e5ab to your computer and use it in GitHub Desktop.
Save escowles/1d6b446c13f77b5d778ae017d250e5ab to your computer and use it in GitHub Desktop.
Valkyre / Fedora 6 snapshot testing
  • Built current commit of Fedora 6 snapshot from main branch (e36826ca87a0d2e3451a43d0235780a2ba33cbb8)
  • Ran one-click JAR with command: java -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar -p 8998
Randomized with seed 13873
Valkyrie::Persistence::Memory::MetadataAdapter
behaves like a Valkyrie::MetadataAdapter
should respond to #id with 0 arguments
should respond to #persister with 0 arguments
caches query_service so it can register custom queries
should respond to #query_service with 0 arguments
#id
is a valid string representation of an MD5 hash
#id
creates an md5 hash from the class name
Valkyrie::Persistence::Postgres::MetadataAdapter
behaves like a Valkyrie::MetadataAdapter
should respond to #persister with 0 arguments
should respond to #query_service with 0 arguments
should respond to #id with 0 arguments
caches query_service so it can register custom queries
#id
is a valid string representation of an MD5 hash
#id
creates an md5 hash from the host and database name
Valkyrie::MetadataAdapter
.find
when no adapter is registered
raises an error
.find_persister_for
with a registered adapter
returns the adapters persister object
.register
registers an adapter to a short name
.find_query_service_for
with a registered adapter
returns the adapters query_service object
Valkyrie::Logging
is a SimpleDelegator wrapper for the given logger
#error
preserves the interface of the underlying logger
with suppressed logging
will log a non-suppressed logging_context
will not log a suppressed logging_context
#fatal
preserves the interface of the underlying logger
with suppressed logging
will log a non-suppressed logging_context
will not log a suppressed logging_context
#debug
preserves the interface of the underlying logger
with suppressed logging
will not log a suppressed logging_context
will log a non-suppressed logging_context
#info
preserves the interface of the underlying logger
with suppressed logging
will not log a suppressed logging_context
will log a non-suppressed logging_context
#warn
preserves the interface of the underlying logger
with suppressed logging
will log a non-suppressed logging_context
will not log a suppressed logging_context
Valkyrie::Persistence::Solr::ORMConverter
.convert!
when not given an updated_at key
is able to generate an object
Valkyrie::Persistence::Memory::QueryService
behaves like a Valkyrie query provider
should respond to #find_all with 0 arguments
should respond to #find_references_by with keywords :resource, :property, and :model
should respond to #find_by with keyword :id
should respond to #find_parents with keyword :resource
should respond to #count_all_of_model with keyword :model
should respond to #find_inverse_references_by with keywords :id, :property, and :model
should respond to #find_members with keywords :resource and :model
should respond to #find_inverse_references_by with keywords :resource, :property, and :model
should respond to #find_by_alternate_identifier with keyword :alternate_identifier
should respond to #find_many_by_ids with keyword :ids
should respond to #find_all_of_model with keyword :model
.register_query_handler
can register a query handler
.find_many_by_ids
returns an empty list if no ids were found
returns an array of resources by ids or string representation ids
returns a partial list for a non-found ID
removes duplicates
raises an error if any id is not a Valkyrie::ID or a string
.find_parents
returns an empty array if there are none
doesn't return same parent twice
returns all parent resources
when the model doesn't have member_ids
returns an empty array if there are none
.find_inverse_references_by
when id is passed instead of resource
returns everything which references the given resource by the given property
filtering by model
when there are no related resources that match the filter
returns an empty array
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the resource is not saved
raises an error
when the resource is saved
when the property is ordered
returns everything which references the given resource by the given property
when the property is ordered for one child but not the other
returns
when the property is unordered
returns everything which references the given resource by the given property
returns an empty array if there are none
when neither id nor resource is passed
raises an error
.find_all_of_model
returns all of that model
returns an empty array if there are none
.find_by
returns a Valkyrie::Persistence::ObjectNotFoundError for a non-found ID
returns a resource by id or string representation of an id
raises an error if the id is not a Valkyrie::ID or a string
.find_references_by
when the property is unordered
removes duplicates
returns an empty array if there are none
returns all references given in a property
returns nothing if reference not found
filtering by model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when there are no related resources that match the filter
returns an empty array
when the object has ordered related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the property is ordered
returns all references in order including duplicates
returns nothing if reference not found
optimistic locking
retrieves the lock token and casts it to optimistic_lock_token attribute
.count_all_of_model
counts all of that model
.find_members
without filtering by model
when there are no members
returns an empty array
when there's no resource ID
doesn't error
when the object has members
returns all a resource's members in order
when something is member more than once
includes duplicates
when the model doesn't have member_ids
returns an empty array
filtering by model
when there are no members that match the filter
returns an empty array
when the object has members
returns all a resource's members in order
.find_by_alternate_identifier
can have multiple alternate identifiers
raises a Valkyrie::Persistence::ObjectNotFoundError when persisted objects do not have alternate_ids
returns a resource by alternate identifier or string representation of an alternate identifier
raises a Valkyrie::Persistence::ObjectNotFoundError for a non-found alternate identifier
raises an error if the alternate identifier is not a Valkyrie::ID or a string
.find_all
returns all created resources
Valkyrie::Persistence::Fedora::MetadataAdapter
fedora 5
behaves like a Valkyrie::MetadataAdapter
should respond to #id with 0 arguments
caches query_service so it can register custom queries
should respond to #persister with 0 arguments
should respond to #query_service with 0 arguments
#id
is a valid string representation of an MD5 hash
#schema
by default
should be a kind of Valkyrie::Persistence::Fedora::PermissiveSchema
with a custom schema
should eq "custom-schema"
#id_to_uri
converts ids with a slash
#uri_to_id
converts ids with a slash
#pair_path
creates pairs until the first slash
creates pairs until the first dash
#id
creates an md5 hash from the connection_prefix
fedora 4
#uri_to_id
converts ids with a slash
#id_to_uri
converts ids with a slash
#schema
by default
should be a kind of Valkyrie::Persistence::Fedora::PermissiveSchema
with a custom schema
should eq "custom-schema"
#pair_path
creates pairs until the first dash
creates pairs until the first slash
#id
creates an md5 hash from the connection_prefix
behaves like a Valkyrie::MetadataAdapter
should respond to #persister with 0 arguments
caches query_service so it can register custom queries
should respond to #query_service with 0 arguments
should respond to #id with 0 arguments
#id
is a valid string representation of an MD5 hash
Valkyrie::Persistence::Memory::Persister
behaves like a Valkyrie::Persister
can persist single values
should respond to #delete with keyword :resource
should respond to #save_all with keyword :resources
can store integers
can mix properties with nested resources
can handle Decimal RDF properties
can handle Integer RDF properties
can handle Date RDF properties
can store Decimals (PENDING: Temporarily skipped with xit)
can support deep nesting of resources
returns nil for an unset single value
doesn't override a resource that already has an ID
should respond to #save with keyword :resource
can handle Time RDF properties
can store Floats
can store Valkyrie::IDs
can store doubles (PENDING: Temporarily skipped with xit)
can handle language-typed RDF properties
can store Times (PENDING: Temporarily skipped with xit)
can find that resource again
can delete all objects
can handle Double RDF properties
can handle DateTime RDF properties
can save nested resources
can save a resource
can store DateTimes
can delete objects
stores created_at/updated_at
can handle Boolean RDF properties
can store Dates (PENDING: Temporarily skipped with xit)
can store booleans
can override default id generation with a provided id
can save multiple resources at once
can handle custom-typed RDF properties
can store ::RDF::URIs
ordered properties
orders URIs and returns them in the appropriate order
orders nested objects with strings
orders integer values and returns them in the appropriate order
orders nested objects
orders date values and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders different types of objects together
orders IDs and returns them in the appropriate order
orders boolean values and returns them in the appropriate order
optimistic locking
#save_all
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
#save
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
parent tests
can remove members
can order members
Valkyrie::Persistence::BufferedPersister
#with_buffer
can buffer a session into a memory adapter
behaves like a Valkyrie::Persister
can handle Decimal RDF properties
can store integers
doesn't override a resource that already has an ID
can override default id generation with a provided id
can handle language-typed RDF properties
can handle Time RDF properties
can handle Boolean RDF properties
can handle Integer RDF properties
can store doubles (PENDING: Temporarily skipped with xit)
can store Dates (PENDING: Temporarily skipped with xit)
should respond to #save_all with keyword :resources
can support deep nesting of resources
stores created_at/updated_at
can find that resource again
can save multiple resources at once
can delete objects
can store Valkyrie::IDs
can store DateTimes
can handle custom-typed RDF properties
can handle Double RDF properties
should respond to #save with keyword :resource
can handle DateTime RDF properties
can save nested resources
can delete all objects
returns nil for an unset single value
can handle Date RDF properties
should respond to #delete with keyword :resource
can save a resource
can store booleans
can store ::RDF::URIs
can store Times (PENDING: Temporarily skipped with xit)
can store Floats
can persist single values
can mix properties with nested resources
can store Decimals (PENDING: Temporarily skipped with xit)
parent tests
can order members
can remove members
ordered properties
orders IDs and returns them in the appropriate order
orders different types of objects together
orders boolean values and returns them in the appropriate order
orders nested objects with strings
orders nested objects
orders URIs and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders date values and returns them in the appropriate order
orders integer values and returns them in the appropriate order
optimistic locking
#save
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
#save_all
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
Valkyrie::ValueMapper
doesn't share value casters with parent
#result
when handled by a registered handler
returns that handler's result
when not handled by a registered handler
returns the given value back
Valkyrie::Persistence::Fedora::Persister
fedora 5
behaves like a Valkyrie::Persister
can find that resource again
stores created_at/updated_at
can delete objects
can save nested resources
can save multiple resources at once
can store integers
can store Floats
can store DateTimes
can delete all objects
can handle Date RDF properties
can store Decimals (PENDING: Temporarily skipped with xit)
returns nil for an unset single value
can store booleans
should respond to #save with keyword :resource
can store Times (PENDING: Temporarily skipped with xit)
can handle Time RDF properties
can override default id generation with a provided id
can store Valkyrie::IDs
can handle Integer RDF properties
can store doubles (PENDING: Temporarily skipped with xit)
can handle language-typed RDF properties
can handle custom-typed RDF properties
can handle Decimal RDF properties
can handle Double RDF properties
can handle DateTime RDF properties
can persist single values
can store ::RDF::URIs
can support deep nesting of resources
can mix properties with nested resources
should respond to #delete with keyword :resource
can store Dates (PENDING: Temporarily skipped with xit)
should respond to #save_all with keyword :resources
can save a resource
can handle Boolean RDF properties
doesn't override a resource that already has an ID
optimistic locking
#save_all
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
#save
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
ordered properties
orders different types of objects together
orders nested objects with strings
orders boolean values and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
orders nested objects
orders date values and returns them in the appropriate order
orders IDs and returns them in the appropriate order
orders URIs and returns them in the appropriate order
orders integer values and returns them in the appropriate order
parent tests
can remove members
can order members
when given an id containing a slash
can store the resource
when given multiple Times
works
using Fedora's builtin optimistic locking
does not raise an error when the object hasn't been updated by another client
raises an error when saving an object that has been updated by another client
when given an alternate identifier
updates an alternate identifier resource
deletes the alternate identifier with the resource
creates an alternate identifier resource
deletes removed alternate identifiers
fedora 4
using Fedora's builtin optimistic locking
does not raise an error when the object hasn't been updated by another client
raises an error when saving an object that has been updated by another client
when given multiple Times
works
behaves like a Valkyrie::Persister
can delete objects
can handle language-typed RDF properties
should respond to #save_all with keyword :resources
can save a resource
can save multiple resources at once
can delete all objects
can store DateTimes
can save nested resources
can store ::RDF::URIs
should respond to #save with keyword :resource
can override default id generation with a provided id
can persist single values
can handle Decimal RDF properties
can handle Integer RDF properties
stores created_at/updated_at
can store doubles (PENDING: Temporarily skipped with xit)
can store Dates (PENDING: Temporarily skipped with xit)
should respond to #delete with keyword :resource
can find that resource again
can handle DateTime RDF properties
can handle Time RDF properties
can store Times (PENDING: Temporarily skipped with xit)
doesn't override a resource that already has an ID
can store Decimals (PENDING: Temporarily skipped with xit)
can store booleans
can store integers
can handle Date RDF properties
can mix properties with nested resources
can store Valkyrie::IDs
returns nil for an unset single value
can handle Double RDF properties
can handle Boolean RDF properties
can support deep nesting of resources
can handle custom-typed RDF properties
can store Floats
parent tests
can remove members
can order members
optimistic locking
#save_all
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
#save
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
ordered properties
orders nested objects with strings
orders string values and returns them in the appropriate order
orders URIs and returns them in the appropriate order
orders nested objects
orders floating point values and returns them in the appropriate order
orders boolean values and returns them in the appropriate order
orders integer values and returns them in the appropriate order
orders IDs and returns them in the appropriate order
orders date values and returns them in the appropriate order
orders different types of objects together
when given an id containing a slash
can store the resource
when given an alternate identifier
updates an alternate identifier resource
creates an alternate identifier resource
deletes removed alternate identifiers
deletes the alternate identifier with the resource
Valkyrie::Storage::Disk
behaves like a Valkyrie::StorageAdapter
should respond to #handles? with keyword :id
can upload, validate, re-fetch, and delete a file
should respond to #upload with keywords :file, :resource, and :original_filename
should respond to #delete with keyword :id
should respond to #find_by with keyword :id
can upload a file which is just an IO
Valkyrie::Persistence::Solr::QueryService
behaves like a Valkyrie query provider
should respond to #find_all_of_model with keyword :model
should respond to #find_inverse_references_by with keywords :resource, :property, and :model
should respond to #find_many_by_ids with keyword :ids
should respond to #find_all with 0 arguments
should respond to #find_by_alternate_identifier with keyword :alternate_identifier
should respond to #find_references_by with keywords :resource, :property, and :model
should respond to #find_parents with keyword :resource
should respond to #count_all_of_model with keyword :model
should respond to #find_inverse_references_by with keywords :id, :property, and :model
should respond to #find_by with keyword :id
should respond to #find_members with keywords :resource and :model
.register_query_handler
can register a query handler
optimistic locking
retrieves the lock token and casts it to optimistic_lock_token attribute
.find_inverse_references_by
when the resource is not saved
raises an error
when id is passed instead of resource
returns everything which references the given resource by the given property
filtering by model
when there are no related resources that match the filter
returns an empty array
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the resource is saved
when the property is ordered for one child but not the other
returns
when the property is unordered
returns everything which references the given resource by the given property
returns an empty array if there are none
when the property is ordered
returns everything which references the given resource by the given property
when neither id nor resource is passed
raises an error
.find_all_of_model
returns all of that model (FAILED - 1)
returns an empty array if there are none (FAILED - 2)
.find_many_by_ids
removes duplicates
returns a partial list for a non-found ID
returns an array of resources by ids or string representation ids
raises an error if any id is not a Valkyrie::ID or a string
returns an empty list if no ids were found
.find_by_alternate_identifier
returns a resource by alternate identifier or string representation of an alternate identifier
can have multiple alternate identifiers
raises an error if the alternate identifier is not a Valkyrie::ID or a string
raises a Valkyrie::Persistence::ObjectNotFoundError for a non-found alternate identifier
raises a Valkyrie::Persistence::ObjectNotFoundError when persisted objects do not have alternate_ids
.find_all
returns all created resources
.find_by
raises an error if the id is not a Valkyrie::ID or a string
returns a Valkyrie::Persistence::ObjectNotFoundError for a non-found ID
returns a resource by id or string representation of an id
.find_references_by
when the property is ordered
returns all references in order including duplicates
returns nothing if reference not found
filtering by model
when the object has ordered related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when there are no related resources that match the filter
returns an empty array
when the property is unordered
returns all references given in a property (FAILED - 3)
returns nothing if reference not found
returns an empty array if there are none
removes duplicates (FAILED - 4)
.find_members
without filtering by model
when the model doesn't have member_ids
returns an empty array
when the object has members
returns all a resource's members in order
when something is member more than once
includes duplicates
when there are no members
returns an empty array
when there's no resource ID
doesn't error
filtering by model
when there are no members that match the filter
returns an empty array
when the object has members
returns all a resource's members in order (FAILED - 5)
.find_parents
returns an empty array if there are none
doesn't return same parent twice
returns all parent resources
when the model doesn't have member_ids
returns an empty array if there are none
.count_all_of_model
counts all of that model (FAILED - 6)
find_members
returns all a resource's members in order
optimistic locking
populates the lock token into the optimistic_lock_token attribute
Valkyrie::Persistence::Solr::MetadataAdapter
#id
creates an md5 hash from the solr connection base_uri
behaves like a Valkyrie::MetadataAdapter
should respond to #persister with 0 arguments
caches query_service so it can register custom queries
should respond to #id with 0 arguments
should respond to #query_service with 0 arguments
#id
is a valid string representation of an MD5 hash
Valkyrie::Storage::Fedora
fedora 5
when uploading with a content_type
passes that on
behaves like a Valkyrie::StorageAdapter
should respond to #handles? with keyword :id
can upload a file which is just an IO
should respond to #upload with keywords :file, :resource, and :original_filename
should respond to #find_by with keyword :id
should respond to #delete with keyword :id
can upload, validate, re-fetch, and delete a file (FAILED - 7)
testing resource uri transformer
when using default transformer
and basepath is passed in
produces a valid URI
when basepath uses default (e.g. '/')
produces a valid URI
when transformer is passed in
produces a valid URI
fedora 4
when uploading with a content_type
passes that on
behaves like a Valkyrie::StorageAdapter
can upload, validate, re-fetch, and delete a file
should respond to #handles? with keyword :id
should respond to #delete with keyword :id
should respond to #find_by with keyword :id
can upload a file which is just an IO
should respond to #upload with keywords :file, :resource, and :original_filename
no ldp gem
raises an error
Valkyrie::Resource
extended class
defining an internal attribute
doesn't change the type
#internal_resource
returns a stringified version of itself
#fields
returns all configured parent fields as an array of symbols
behaves like a Valkyrie::Resource
#set_value
can set a value
#__attributes__
returns all defined attributes, but doesn't add nil keys
#id
is nil when not set
should respond to #persisted? with 0 arguments
should respond to #column_for_attribute with 1 argument
should respond to #model_name with 0 arguments
should respond to #to_param with 0 arguments
can be set via instantiation and casts to a Valkyrie::ID
should respond to #to_model with 0 arguments
#has_attribute?
returns true when it has a given attribute
#fields
returns a set of fields
#attributes
returns a list of all set attributes
#human_readable_type
returns a human readable rendering of the resource class
.new
can not set values with string properties
can set values with symbols
#attributes
returns all defined attributs, including nil keys
#[]
can be accessed via a string
allows access to properties which are set
returns nil for non-existent properties
#internal_resource
is set to the resource's class on instantiation
.attributes
defines new attributes
defines setters for attributes
#to_model
returns itself
#to_param
returns the record's id as a string
#to_s
returns a good serialization
#persisted?
when new_record: false is passed to the constructor
should be persisted
when nothing is passed to the constructor
should not be persisted
#to_key
returns the record's id in an array
::enable_optimistic_locking
when it is enabled
has an optimistic_lock_token attribute
.clear_optimistic_lock_token!
sets the optimistic_lock_token attribute to an empty Array
.optimistic_lock_token
returns an empty array by default
casts serialized tokens to OptimisticLockTokens
returns a token if given a token
when it is not enabled
does not have an optimistic_lock_token attribute
.clear_optimistic_lock_token!
makes no attempt to set the optimistic_lock_token attribute
#has_attribute?
returns true for fields that exist
.human_readable_type=
sets the human readable type
#column_for_attribute
returns the column
#model_name
returns a model name at the class level
returns a model name
#fields
returns all configured fields as an array of symbols
Valkyrie::Persistence::OptimisticLockToken
.deserialize
casts a string to an object
#==
two tokens have the same adapters and the same tokens
should eq #<Valkyrie::Persistence::OptimisticLockToken:0x00007f88f56f0948 @adapter_id="adapter1", @token="token1">
when the other token is not a Valkyrie::Persistence::OptimisticLockToken
should not eq "token1"
two tokens have the same adapters and different tokens
should not eq #<Valkyrie::Persistence::OptimisticLockToken:0x00007f88f5792518 @adapter_id="adapter1", @token="token2">
two tokens have different adapters
should not eq #<Valkyrie::Persistence::OptimisticLockToken:0x00007f88fc54b1b8 @adapter_id="adapter2", @token="token1">
#initialize
defines a token and an adapter_id
#serialize
casts the object to a string
Valkyrie::ResourceGenerator
create app/models/helm.rb
identical spec/models/helm_spec.rb
has title and member_ids fields
generates the model and model test files
behaves like a Valkyrie::Resource
#[]
allows access to properties which are set
can be accessed via a string
returns nil for non-existent properties
#__attributes__
returns all defined attributes, but doesn't add nil keys
.new
can set values with symbols
can not set values with string properties
#human_readable_type
returns a human readable rendering of the resource class
#internal_resource
is set to the resource's class on instantiation
#attributes
returns all defined attributs, including nil keys
#id
should respond to #model_name with 0 arguments
should respond to #to_model with 0 arguments
should respond to #persisted? with 0 arguments
can be set via instantiation and casts to a Valkyrie::ID
should respond to #to_param with 0 arguments
should respond to #column_for_attribute with 1 argument
is nil when not set
#attributes
returns a list of all set attributes
#fields
returns a set of fields
#has_attribute?
returns true when it has a given attribute
#set_value
can set a value
remove app/models/helm.rb
Valkyrie
has a configuration loaded from Valkyrie's root
can have a configured adapter, which it looks up
can have a configured storage adapter, which it looks up
has a version number
can set a logger
when Rails is defined and configured
uses that path
.config
.resource_class_resolver
should respond to #call with 1 argument
when called
will by default constantize the given string
when configured
will use the configured lambda
Valkyrie::Storage::Memory
behaves like a Valkyrie::StorageAdapter
should respond to #find_by with keyword :id
can upload a file which is just an IO
can upload, validate, re-fetch, and delete a file
should respond to #handles? with keyword :id
should respond to #delete with keyword :id
should respond to #upload with keywords :file, :resource, and :original_filename
Valkyrie::StorageAdapter::StreamFile
behaves like a Valkyrie::StorageAdapter::File
should respond to #rewind
should respond to #read
should respond to #id
#disk_path
returns an existing disk path
#disk_path
with the disk or memory storage adapter
provides a path to the file for the storage adapter
Valkyrie::Persistence::Solr::Persister
behaves like a Valkyrie::Persister
can handle Integer RDF properties
can handle language-typed RDF properties
can store Valkyrie::IDs
can handle Date RDF properties
can save nested resources
can handle Time RDF properties
can persist single values
can save a resource
can handle Boolean RDF properties
should respond to #save_all with keyword :resources
can handle custom-typed RDF properties
can handle DateTime RDF properties
can store integers
should respond to #delete with keyword :resource
can mix properties with nested resources
doesn't override a resource that already has an ID
can delete objects
returns nil for an unset single value
should respond to #save with keyword :resource
can store Times (PENDING: Temporarily skipped with xit)
can find that resource again
can delete all objects
can handle Double RDF properties
can store DateTimes
can handle Decimal RDF properties
can store doubles (PENDING: Temporarily skipped with xit)
can store booleans
stores created_at/updated_at
can save multiple resources at once
can override default id generation with a provided id
can store Floats
can support deep nesting of resources
can store ::RDF::URIs
can store Dates (PENDING: Temporarily skipped with xit)
can store Decimals (PENDING: Temporarily skipped with xit)
parent tests
can order members
can remove members
optimistic locking
#save
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
#save_all
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
ordered properties
orders nested objects
orders IDs and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders boolean values and returns them in the appropriate order
orders integer values and returns them in the appropriate order
orders nested objects with strings
orders URIs and returns them in the appropriate order
orders different types of objects together
orders date values and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
#save
when solr does not return a response
passes the exception through
when updating a resource with an invalid token
raises an Rsolr 500 Error
converting a DateTime
Returns a string when DateTime conversion fails
no rsolr gem
raises an error
when given additional persisters
can add custom indexing
when told to index a really long string
works
Valkyrie::Types
The URI Type
returns an RDF::URI for a nil uri
returns an RDF::URI
The ID type
when a string is passed in
casts to a string
doesn't echo a deprecated message if configured
echos a deprecated message if not configured
when String equality is configured
equals the equivalent string
is equal to the equivalent string
when an array of ids is passed in
uses the first
when an ID is passed in
uses the passed in value
Valkyrie::Types::Params::ID
when a blank string is passed in
returns nil
when passed a string
returns a Valkyrie::Types::ID
Single Valued String
returns the first of a set of values
Valkyrie::Types::OptimisticLockToken
casts from a string
The array type
is not modifiable
doesn't create things inside if no value is passed
returns an empty array if given an empty hash
doesn't create things inside if no value is passed via of
the DateTime type
can be set as a time inside an array
the OrderedRelation type
acts as an ordered Array of Valkyrie::Types::ID
casts values to ID type
returns all values in order including duplicates
can contain IDs
A boolean value
returns the boolean value set
a set of values
can contain any type except empty string and nil
returns an empty array if given an empty hash
doesn't create things inside if no value is passed
can create things
the Relation type
acts as a Set of Valkyrie::Types::ID
can contain IDs
casts values to ID type
Valkyrie::Persistence::DeleteTrackingBuffer
tracks deletes
behaves like a Valkyrie::Persister
can override default id generation with a provided id
can find that resource again
can handle language-typed RDF properties
can store Valkyrie::IDs
stores created_at/updated_at
can delete objects
can store doubles (PENDING: Temporarily skipped with xit)
can persist single values
can handle Decimal RDF properties
can save a resource
can handle DateTime RDF properties
should respond to #save with keyword :resource
can support deep nesting of resources
can mix properties with nested resources
can handle Boolean RDF properties
can delete all objects
can handle Date RDF properties
can store Dates (PENDING: Temporarily skipped with xit)
can handle Integer RDF properties
can handle custom-typed RDF properties
can store integers
returns nil for an unset single value
should respond to #delete with keyword :resource
can store Times (PENDING: Temporarily skipped with xit)
can store Floats
can save multiple resources at once
can handle Double RDF properties
can store ::RDF::URIs
can store DateTimes
can store booleans
can handle Time RDF properties
should respond to #save_all with keyword :resources
can save nested resources
can store Decimals (PENDING: Temporarily skipped with xit)
doesn't override a resource that already has an ID
optimistic locking
#save_all
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
#save
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
parent tests
can order members
can remove members
ordered properties
orders date values and returns them in the appropriate order
orders IDs and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders nested objects with strings
orders different types of objects together
orders URIs and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
orders boolean values and returns them in the appropriate order
orders integer values and returns them in the appropriate order
orders nested objects
Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::Applicator
#blacklist
is deprecated in favor of #denylist
#blacklist?
is deprecated in favor of #deny?
Valkyrie::StorageAdapter
.register
can register a storage_adapter by a short name for easier access
.find
with an unregistered adapter
raises a Valkyrie::StorageAdapter::AdapterNotFoundError
.delete
calls delete on the matching identifier
.find_by
delegates down to its storage_adapters to find one which handles the given identifier
.adapter_for
raises an exception if unable to find a StorageAdapter
finds a storage adapter for a given identifier
Valkyrie::ChangeSet
#multiple?
is not multiple for tagged items
is multiple for un-tagged items
raises an error when no field exists
#required?
is true when marked
is false when not marked
.reflect_on_association
always returns nil
.validators_on
the class responds to validators_on
#validate
revalidates on correction
#fields=
creates a field with a default
behaves like a Valkyrie::ChangeSet
should respond to #fields=
should respond to #append_id
should respond to #prepopulate!
should respond to #valid?
should respond to #multiple?
should respond to #validate
should respond to #required?
should respond to #fields
can set an append_id
#valid?
returns a boolean
.validators_on
the class responds to validators_on
#fields
returns an hash
#multiple?
returns a boolean
#prepopulate!
doesn't make it look changed
#required?
returns a boolean
#optimistic_locking_enabled?
delegates down to the resource
#fields=
sets fields
#validate
returns a change_set
.model_for_property
returns the model
Valkyrie::Persistence::Fedora::PermissiveSchema
.optimistic_lock_token
returns the expected temporary URI
Valkyrie::StorageAdapter::File
#disk_path
with the disk or memory storage adapter
provides a path to the file for the storage adapter
behaves like a Valkyrie::StorageAdapter::File
should respond to #read
should respond to #id
should respond to #rewind
#disk_path
returns an existing disk path
Valkyrie::Indexers::AccessControlsIndexer
.to_solr
without Hydra::AccessControls
indexes without Hydra::AccessControls
when it's passed a resource which has no read_users
does nothing
with Hydra::AccessControls
indexes with Hydra::AccessControls
behaves like a Valkyrie::Persistence::Solr::Indexer
#to_solr
should be a kind of Hash
Valkyrie::Persistence
defines a constant for optimistic lock attribute
Valkyrie::Persistence::Solr::CompositeIndexer
adds custom indexing from the embedded Indexer
Valkyrie::Persistence::Postgres::QueryService
behaves like a Valkyrie query provider
should respond to #find_parents with keyword :resource
should respond to #find_all with 0 arguments
should respond to #find_inverse_references_by with keywords :id, :property, and :model
should respond to #count_all_of_model with keyword :model
should respond to #find_all_of_model with keyword :model
should respond to #find_many_by_ids with keyword :ids
should respond to #find_by with keyword :id
should respond to #find_references_by with keywords :resource, :property, and :model
should respond to #find_by_alternate_identifier with keyword :alternate_identifier
should respond to #find_inverse_references_by with keywords :resource, :property, and :model
should respond to #find_members with keywords :resource and :model
.register_query_handler
can register a query handler
.count_all_of_model
counts all of that model
.find_all
returns all created resources
.find_parents
returns all parent resources
doesn't return same parent twice
returns an empty array if there are none
when the model doesn't have member_ids
returns an empty array if there are none
optimistic locking
retrieves the lock token and casts it to optimistic_lock_token attribute
.find_all_of_model
returns all of that model
returns an empty array if there are none
.find_many_by_ids
removes duplicates
returns an array of resources by ids or string representation ids
raises an error if any id is not a Valkyrie::ID or a string
returns a partial list for a non-found ID
returns an empty list if no ids were found
.find_inverse_references_by
when neither id nor resource is passed
raises an error
filtering by model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when there are no related resources that match the filter
returns an empty array
when the resource is not saved
raises an error
when id is passed instead of resource
returns everything which references the given resource by the given property
when the resource is saved
when the property is unordered
returns an empty array if there are none
returns everything which references the given resource by the given property
when the property is ordered for one child but not the other
returns
when the property is ordered
returns everything which references the given resource by the given property
.find_by
returns a Valkyrie::Persistence::ObjectNotFoundError for a non-found ID
raises an error if the id is not a Valkyrie::ID or a string
returns a resource by id or string representation of an id
.find_members
without filtering by model
when there's no resource ID
doesn't error
when the object has members
returns all a resource's members in order
when something is member more than once
includes duplicates
when there are no members
returns an empty array
when the model doesn't have member_ids
returns an empty array
filtering by model
when there are no members that match the filter
returns an empty array
when the object has members
returns all a resource's members in order
.find_references_by
when the property is unordered
returns nothing if reference not found
returns an empty array if there are none
removes duplicates
returns all references given in a property
when the property is ordered
returns nothing if reference not found
returns all references in order including duplicates
filtering by model
when the object has ordered related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when there are no related resources that match the filter
returns an empty array
.find_by_alternate_identifier
can have multiple alternate identifiers
raises an error if the alternate identifier is not a Valkyrie::ID or a string
raises a Valkyrie::Persistence::ObjectNotFoundError when persisted objects do not have alternate_ids
raises a Valkyrie::Persistence::ObjectNotFoundError for a non-found alternate identifier
returns a resource by alternate identifier or string representation of an alternate identifier
Valkyrie::Persistence::Solr::ModelConverter
#to_h
maps all available properties to the solr record
when there's an error
raises an error
#created_at
when created_at attribute is a Time
returns a String
when created_at attribute is nil
returns a String
Valkyrie::Persistence::Postgres::Persister
saving with a given ID
when given an ID it can't save
raises an UnsupportedDatatype exception
when given a UUID
saves it, maintaining the ID
behaves like a Valkyrie::Persister
can handle custom-typed RDF properties
can delete objects
should respond to #save with keyword :resource
can support deep nesting of resources
can handle Integer RDF properties
can override default id generation with a provided id
can store booleans
can handle Boolean RDF properties
can handle Time RDF properties
can find that resource again
can handle Date RDF properties
can delete all objects
can save a resource
can save multiple resources at once
doesn't override a resource that already has an ID
can persist single values
can store ::RDF::URIs
can handle Decimal RDF properties
can store Times (PENDING: Temporarily skipped with xit)
can handle language-typed RDF properties
can save nested resources
can store Decimals (PENDING: Temporarily skipped with xit)
should respond to #delete with keyword :resource
can store doubles (PENDING: Temporarily skipped with xit)
returns nil for an unset single value
can store DateTimes
can handle DateTime RDF properties
can store Valkyrie::IDs
can store integers
should respond to #save_all with keyword :resources
can handle Double RDF properties
can store Dates (PENDING: Temporarily skipped with xit)
can store Floats
stores created_at/updated_at
can mix properties with nested resources
ordered properties
orders floating point values and returns them in the appropriate order
orders nested objects with strings
orders nested objects
orders different types of objects together
orders IDs and returns them in the appropriate order
orders integer values and returns them in the appropriate order
orders URIs and returns them in the appropriate order
orders date values and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders boolean values and returns them in the appropriate order
parent tests
can remove members
can order members
optimistic locking
#save_all
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
#save
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when using an optimistically locked resource
no postgres gem
raises an error
and the migrations haven't been run
loads the object, but sends a warning with instructions
and locking isn't enabled
doesn't use the lock
no activerecord gem
raises an error
single value behavior
stores single values as multiple
save_all
rolls back a transaction if something blows up
converting a DateTime
Returns a string when DateTime conversion fails
Valkyrie::AdapterContainer
wraps up a persister and a query service
Valkyrie::Persistence::Fedora::QueryService
fedora 5
behaves like a Valkyrie query provider
should respond to #find_inverse_references_by with keywords :id, :property, and :model
should respond to #find_by_alternate_identifier with keyword :alternate_identifier
should respond to #find_all with 0 arguments
should respond to #find_by with keyword :id
should respond to #find_many_by_ids with keyword :ids
should respond to #count_all_of_model with keyword :model
should respond to #find_parents with keyword :resource
should respond to #find_all_of_model with keyword :model
should respond to #find_references_by with keywords :resource, :property, and :model
should respond to #find_members with keywords :resource and :model
should respond to #find_inverse_references_by with keywords :resource, :property, and :model
.find_references_by
when the property is unordered
removes duplicates
returns all references given in a property
returns nothing if reference not found
returns an empty array if there are none
filtering by model
when there are no related resources that match the filter
returns an empty array
when the object has ordered related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the property is ordered
returns all references in order including duplicates
returns nothing if reference not found
optimistic locking
retrieves the lock token and casts it to optimistic_lock_token attribute
.find_inverse_references_by
filtering by model
when there are no related resources that match the filter
returns an empty array
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model (FAILED - 8)
when neither id nor resource is passed
raises an error
when the resource is saved
when the property is ordered for one child but not the other
returns (FAILED - 9)
when the property is unordered
returns everything which references the given resource by the given property (FAILED - 10)
returns an empty array if there are none
when the property is ordered
returns everything which references the given resource by the given property (FAILED - 11)
when the resource is not saved
raises an error
when id is passed instead of resource
returns everything which references the given resource by the given property (FAILED - 12)
.find_members
without filtering by model
when there's no resource ID
doesn't error
when the model doesn't have member_ids
returns an empty array
when there are no members
returns an empty array
when the object has members
returns all a resource's members in order
when something is member more than once
includes duplicates
filtering by model
when the object has members
returns all a resource's members in order
when there are no members that match the filter
returns an empty array
.find_by
raises an error if the id is not a Valkyrie::ID or a string
returns a Valkyrie::Persistence::ObjectNotFoundError for a non-found ID
returns a resource by id or string representation of an id
.count_all_of_model
counts all of that model
.find_all
returns all created resources
.find_all_of_model
returns an empty array if there are none
returns all of that model
.find_parents
doesn't return same parent twice (FAILED - 13)
returns an empty array if there are none
returns all parent resources (FAILED - 14)
when the model doesn't have member_ids
returns an empty array if there are none
.find_many_by_ids
raises an error if any id is not a Valkyrie::ID or a string
returns an array of resources by ids or string representation ids
returns an empty list if no ids were found
removes duplicates
returns a partial list for a non-found ID
.register_query_handler
can register a query handler
.find_by_alternate_identifier
raises a Valkyrie::Persistence::ObjectNotFoundError for a non-found alternate identifier
raises a Valkyrie::Persistence::ObjectNotFoundError when persisted objects do not have alternate_ids
raises an error if the alternate identifier is not a Valkyrie::ID or a string
returns a resource by alternate identifier or string representation of an alternate identifier
can have multiple alternate identifiers
fedora 4
behaves like a Valkyrie query provider
should respond to #find_parents with keyword :resource
should respond to #find_references_by with keywords :resource, :property, and :model
should respond to #find_members with keywords :resource and :model
should respond to #find_inverse_references_by with keywords :resource, :property, and :model
should respond to #find_many_by_ids with keyword :ids
should respond to #find_all_of_model with keyword :model
should respond to #find_by_alternate_identifier with keyword :alternate_identifier
should respond to #count_all_of_model with keyword :model
should respond to #find_all with 0 arguments
should respond to #find_by with keyword :id
should respond to #find_inverse_references_by with keywords :id, :property, and :model
.find_references_by
when the property is unordered
returns an empty array if there are none
removes duplicates
returns nothing if reference not found
returns all references given in a property
when the property is ordered
returns all references in order including duplicates
returns nothing if reference not found
filtering by model
when there are no related resources that match the filter
returns an empty array
when the object has ordered related resources that match the filter
returns only resources with the relationship filtered to the specified model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
optimistic locking
retrieves the lock token and casts it to optimistic_lock_token attribute
.find_inverse_references_by
when id is passed instead of resource
returns everything which references the given resource by the given property
when the resource is not saved
raises an error
filtering by model
when the object has related resources that match the filter
returns only resources with the relationship filtered to the specified model
when there are no related resources that match the filter
returns an empty array
when neither id nor resource is passed
raises an error
when the resource is saved
when the property is ordered
returns everything which references the given resource by the given property
when the property is ordered for one child but not the other
returns
when the property is unordered
returns an empty array if there are none
returns everything which references the given resource by the given property
.find_many_by_ids
removes duplicates
returns an empty list if no ids were found
raises an error if any id is not a Valkyrie::ID or a string
returns a partial list for a non-found ID
returns an array of resources by ids or string representation ids
.find_parents
returns an empty array if there are none
returns all parent resources
doesn't return same parent twice
when the model doesn't have member_ids
returns an empty array if there are none
.find_by
returns a resource by id or string representation of an id
raises an error if the id is not a Valkyrie::ID or a string
returns a Valkyrie::Persistence::ObjectNotFoundError for a non-found ID
.find_all
returns all created resources
.find_by_alternate_identifier
raises a Valkyrie::Persistence::ObjectNotFoundError when persisted objects do not have alternate_ids
raises an error if the alternate identifier is not a Valkyrie::ID or a string
can have multiple alternate identifiers
raises a Valkyrie::Persistence::ObjectNotFoundError for a non-found alternate identifier
returns a resource by alternate identifier or string representation of an alternate identifier
.find_members
without filtering by model
when there are no members
returns an empty array
when there's no resource ID
doesn't error
when the model doesn't have member_ids
returns an empty array
when the object has members
returns all a resource's members in order
when something is member more than once
includes duplicates
filtering by model
when the object has members
returns all a resource's members in order
when there are no members that match the filter
returns an empty array
.register_query_handler
can register a query handler
.find_all_of_model
returns an empty array if there are none
returns all of that model
.count_all_of_model
counts all of that model
Valkyrie::Persistence::CompositePersister
with postgres and solr
can find the object in the solr persister
behaves like a Valkyrie::Persister
can handle Time RDF properties
should respond to #save with keyword :resource
doesn't override a resource that already has an ID
can persist single values
can delete objects
can handle Date RDF properties
can handle Integer RDF properties
can handle language-typed RDF properties
can override default id generation with a provided id
stores created_at/updated_at
can handle Decimal RDF properties
can save multiple resources at once
can store integers
can handle custom-typed RDF properties
can store Decimals (PENDING: Temporarily skipped with xit)
can find that resource again
can handle DateTime RDF properties
should respond to #save_all with keyword :resources
can save a resource
can store DateTimes
can handle Double RDF properties
can delete all objects
can store Times (PENDING: Temporarily skipped with xit)
can store doubles (PENDING: Temporarily skipped with xit)
can support deep nesting of resources
can save nested resources
can store Valkyrie::IDs
can mix properties with nested resources
can handle Boolean RDF properties
can store booleans
returns nil for an unset single value
should respond to #delete with keyword :resource
can store ::RDF::URIs
can store Floats
can store Dates (PENDING: Temporarily skipped with xit)
ordered properties
orders boolean values and returns them in the appropriate order
orders IDs and returns them in the appropriate order
orders different types of objects together
orders date values and returns them in the appropriate order
orders URIs and returns them in the appropriate order
orders string values and returns them in the appropriate order
orders nested objects with strings
orders nested objects
orders integer values and returns them in the appropriate order
orders floating point values and returns them in the appropriate order
optimistic locking
#save
when there is a token, but it's for a different adapter (migration use case)
successfully saves the resource and returns a token for the adapter that was saved to
when updating a resource with an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
when creating a resource
returns the value of the system-generated optimistic locking attribute on the resource
when updating a resource with a correct lock token
successfully saves the resource and returns the updated value of the optimistic locking attribute
when lock token is nil
successfully saves the resource and returns the updated value of the optimistic locking attribute
#save_all
when creating multiple resources
returns an array of resources with their system-generated optimistic locking attributes
when updating multiple resources that all have a correct lock token
saves the resources and returns them with updated values of the optimistic locking attribute
when one of the resources has an incorrect lock token
raises a Valkyrie::Persistence::StaleObjectError
parent tests
can order members
can remove members
Valkyrie::Persistence::Fedora::Persister::ModelConverter
fedora 5
with a defined schema
persists to Fedora using the defined predicate
with the default schema
persists to Fedora using a fake predicate
fedora 4
with a defined schema
persists to Fedora using the defined predicate
with the default schema
persists to Fedora using a fake predicate
Pending: (Failures listed here are expected and do not affect your suite's status)
1) Valkyrie::Persistence::Memory::Persister behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
2) Valkyrie::Persistence::Memory::Persister behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
3) Valkyrie::Persistence::Memory::Persister behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
4) Valkyrie::Persistence::Memory::Persister behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
5) Valkyrie::Persistence::BufferedPersister behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
6) Valkyrie::Persistence::BufferedPersister behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
7) Valkyrie::Persistence::BufferedPersister behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
8) Valkyrie::Persistence::BufferedPersister behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
9) Valkyrie::Persistence::Fedora::Persister fedora 5 behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
10) Valkyrie::Persistence::Fedora::Persister fedora 5 behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
11) Valkyrie::Persistence::Fedora::Persister fedora 5 behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
12) Valkyrie::Persistence::Fedora::Persister fedora 5 behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
13) Valkyrie::Persistence::Fedora::Persister fedora 4 behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
14) Valkyrie::Persistence::Fedora::Persister fedora 4 behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
15) Valkyrie::Persistence::Fedora::Persister fedora 4 behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
16) Valkyrie::Persistence::Fedora::Persister fedora 4 behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
17) Valkyrie::Persistence::Solr::Persister behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
18) Valkyrie::Persistence::Solr::Persister behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
19) Valkyrie::Persistence::Solr::Persister behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
20) Valkyrie::Persistence::Solr::Persister behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
21) Valkyrie::Persistence::DeleteTrackingBuffer behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
22) Valkyrie::Persistence::DeleteTrackingBuffer behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
23) Valkyrie::Persistence::DeleteTrackingBuffer behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
24) Valkyrie::Persistence::DeleteTrackingBuffer behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
25) Valkyrie::Persistence::Postgres::Persister behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
26) Valkyrie::Persistence::Postgres::Persister behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
27) Valkyrie::Persistence::Postgres::Persister behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
28) Valkyrie::Persistence::Postgres::Persister behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
29) Valkyrie::Persistence::CompositePersister behaves like a Valkyrie::Persister can store Decimals
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:212
30) Valkyrie::Persistence::CompositePersister behaves like a Valkyrie::Persister can store Times
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:237
31) Valkyrie::Persistence::CompositePersister behaves like a Valkyrie::Persister can store doubles
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:221
32) Valkyrie::Persistence::CompositePersister behaves like a Valkyrie::Persister can store Dates
# Temporarily skipped with xit
# ./lib/valkyrie/specs/shared_specs/persister.rb:181
Failures:
1) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_all_of_model returns all of that model
Failure/Error: docs = connection.paginate(docs.next_page, docs.per_page, "select", params: { q: query })["response"]["docs"]
RSolr::Error::Http:
RSolr::Error::Http - 400 Bad Request
Error: {
"responseHeader":{
"status":400,
"QTime":0,
"params":{
"q":"internal_resource_ssim:Valkyrie::Specs::SecondResource",
"start":"0",
"rows":"100",
"wt":"json"}},
"error":{
"metadata":[
URI: http://127.0.0.1:8984/solr/blacklight-core-test/select?wt=json&q=internal_resource_ssim%3AValkyrie%3A%3ASpecs%3A%3ASecondResource&start=0&rows=100
Backtrace: /Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:206:in `rescue in execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:196:in `execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:75:in `paginate'
/Users/escowles/src/valkyrie/lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:56:in `each'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:56:in `map'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:56:in `block (3 levels) in <top (required)>'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# ./lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
# ./lib/valkyrie/specs/shared_specs/queries.rb:56:in `each'
# ./lib/valkyrie/specs/shared_specs/queries.rb:56:in `map'
# ./lib/valkyrie/specs/shared_specs/queries.rb:56:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Faraday::ClientError:
# the server responded with status 400
# ./lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
2) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_all_of_model returns an empty array if there are none
Failure/Error: docs = connection.paginate(docs.next_page, docs.per_page, "select", params: { q: query })["response"]["docs"]
RSolr::Error::Http:
RSolr::Error::Http - 400 Bad Request
Error: {
"responseHeader":{
"status":400,
"QTime":0,
"params":{
"q":"internal_resource_ssim:Valkyrie::Specs::SecondResource",
"start":"0",
"rows":"100",
"wt":"json"}},
"error":{
"metadata":[
URI: http://127.0.0.1:8984/solr/blacklight-core-test/select?wt=json&q=internal_resource_ssim%3AValkyrie%3A%3ASpecs%3A%3ASecondResource&start=0&rows=100
Backtrace: /Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:206:in `rescue in execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:196:in `execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:75:in `paginate'
/Users/escowles/src/valkyrie/lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:59:in `each'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:59:in `to_a'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:59:in `block (3 levels) in <top (required)>'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# ./lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
# ./lib/valkyrie/specs/shared_specs/queries.rb:59:in `each'
# ./lib/valkyrie/specs/shared_specs/queries.rb:59:in `to_a'
# ./lib/valkyrie/specs/shared_specs/queries.rb:59:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Faraday::ClientError:
# the server responded with status 400
# ./lib/valkyrie/persistence/solr/queries/find_all_query.rb:29:in `each'
3) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_references_by when the property is unordered returns all references given in a property
Failure/Error: expect(query_service.find_references_by(resource: child, property: :a_member_of).map(&:id).to_a).to contain_exactly parent.id, parent2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88f5cc3348 @id="cf55467a-e2f1-4798-a227-ae5f0bbe9de2">, #<Valkyrie::ID:0x00007f88fc531470 @id="921753ba-ebfb-4c1d-b1d7-bc4c832fc231">]
actual collection contained: [#<Valkyrie::ID:0x00007f88f782b860 @id="cf55467a-e2f1-4798-a227-ae5f0bbe9de2">, #<Valkyrie::ID:0x0000...-aaa5-5bd04f56e84f">, #<Valkyrie::ID:0x00007f88f7825140 @id="e6ac7ea4-70f9-4cf7-b481-b80e3a7e19b4">]
the extra elements were: [#<Valkyrie::ID:0x00007f88f7827148 @id="e319e869-2211-4df4-aaa5-5bd04f56e84f">, #<Valkyrie::ID:0x00007f88f7825140 @id="e6ac7ea4-70f9-4cf7-b481-b80e3a7e19b4">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# ./lib/valkyrie/specs/shared_specs/queries.rb:241:in `block (4 levels) in <top (required)>'
4) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_references_by when the property is unordered removes duplicates
Failure/Error: expect(query_service.find_references_by(resource: child, property: :a_member_of).map(&:id).to_a).to contain_exactly parent.id
expected collection contained: [#<Valkyrie::ID:0x00007f88f559cd30 @id="0125a499-98ea-408f-b7f6-b980fb367199">]
actual collection contained: [#<Valkyrie::ID:0x00007f88fb4ec218 @id="0125a499-98ea-408f-b7f6-b980fb367199">, #<Valkyrie::ID:0x0000...-ba35-6b50c253582c">, #<Valkyrie::ID:0x00007f88fb4d6bc0 @id="37898815-5063-4401-ba3f-ba230a9d2f79">]
the extra elements were: [#<Valkyrie::ID:0x00007f88fb4de5f0 @id="abe9441c-d857-4458-ba35-6b50c253582c">, #<Valkyrie::ID:0x00007f88fb4d6bc0 @id="37898815-5063-4401-ba3f-ba230a9d2f79">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# ./lib/valkyrie/specs/shared_specs/queries.rb:254:in `block (4 levels) in <top (required)>'
5) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_members filtering by model when the object has members returns all a resource's members in order
Failure/Error: expect(subject.map(&:id).to_a).to eq [child3.id, child1.id]
expected: [#<Valkyrie::ID:0x00007f88fc7b9940 @id="5c74a35d-55ca-45e9-8e74-68cfbab347a7">, #<Valkyrie::ID:0x00007f88fc769620 @id="01c85b09-a7cf-4e01-af8f-75aa7e6bf974">]
got: []
(compared using ==)
Diff:
@@ -1,3 +1,2 @@
-[#<Valkyrie::ID:0x00007f88fc7b9940 @id="5c74a35d-55ca-45e9-8e74-68cfbab347a7">,
- #<Valkyrie::ID:0x00007f88fc769620 @id="01c85b09-a7cf-4e01-af8f-75aa7e6bf974">]
+[]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# ./lib/valkyrie/specs/shared_specs/queries.rb:218:in `block (5 levels) in <top (required)>'
6) Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .count_all_of_model counts all of that model
Failure/Error: connection.get("select", params: { q: query })["response"]["numFound"].to_s.to_i
RSolr::Error::Http:
RSolr::Error::Http - 400 Bad Request
Error: {
"responseHeader":{
"status":400,
"QTime":0,
"params":{
"q":"internal_resource_ssim:Valkyrie::Specs::SecondResource",
"wt":"json"}},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.parser.ParseException"],
URI: http://127.0.0.1:8984/solr/blacklight-core-test/select?wt=json&q=internal_resource_ssim%3AValkyrie%3A%3ASpecs%3A%3ASecondResource
Backtrace: /Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:206:in `rescue in execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:196:in `execute'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rsolr-2.2.1/lib/rsolr/client.rb:191:in `send_and_receive'
(eval):2:in `get'
/Users/escowles/src/valkyrie/lib/valkyrie/persistence/solr/queries/find_all_query.rb:39:in `count'
/Users/escowles/src/valkyrie/lib/valkyrie/persistence/solr/query_service.rb:53:in `count_all_of_model'
/Users/escowles/src/valkyrie/lib/valkyrie/specs/shared_specs/queries.rb:514:in `block (3 levels) in <top (required)>'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `instance_exec'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:254:in `block in run'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
/Users/escowles/.asdf/installs/ruby/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/solr/query_service_spec.rb:14
# (eval):2:in `get'
# ./lib/valkyrie/persistence/solr/queries/find_all_query.rb:39:in `count'
# ./lib/valkyrie/persistence/solr/query_service.rb:53:in `count_all_of_model'
# ./lib/valkyrie/specs/shared_specs/queries.rb:514:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Faraday::ClientError:
# the server responded with status 400
# (eval):2:in `get'
7) Valkyrie::Storage::Fedora fedora 5 behaves like a Valkyrie::StorageAdapter can upload, validate, re-fetch, and delete a file
Failure/Error: raise Valkyrie::StorageAdapter::FileNotFound unless response.success?
Valkyrie::StorageAdapter::FileNotFound:
Valkyrie::StorageAdapter::FileNotFound
Shared Example Group: "a Valkyrie::StorageAdapter" called from ./spec/valkyrie/storage/fedora_spec.rb:56
# ./lib/valkyrie/storage/fedora.rb:89:in `response'
# ./lib/valkyrie/storage/fedora.rb:27:in `find_by'
# ./lib/valkyrie/storage/fedora.rb:51:in `upload'
# ./lib/valkyrie/specs/shared_specs/storage_adapter.rb:37:in `block (2 levels) in <top (required)>'
8) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by filtering by model when the object has related resources that match the filter returns only resources with the relationship filtered to the specified model
Failure/Error: expect(subject.map(&:id).to_a).to match_array [child3.id, child1.id]
expected collection contained: [#<Valkyrie::ID:0x00007f88fe28fd50 @id="e32f825c-0b3a-4c09-be0c-88d9fb5a8cd4">, #<Valkyrie::ID:0x00007f88ff2737f8 @id="52a6e996-38ce-4c97-ac6f-f57b500e8b16">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88fe28fd50 @id="e32f825c-0b3a-4c09-be0c-88d9fb5a8cd4">, #<Valkyrie::ID:0x00007f88ff2737f8 @id="52a6e996-38ce-4c97-ac6f-f57b500e8b16">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:418:in `block (5 levels) in <top (required)>'
9) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is ordered for one child but not the other returns
Failure/Error: expect(query_service.find_inverse_references_by(resource: parent, property: :a_member_of).map(&:id).to_a).to contain_exactly child.id, child2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88fc7d9c68 @id="c6cf905a-ee69-44b4-bed6-e594e6b57bac">, #<Valkyrie::ID:0x00007f88f5f1f420 @id="722e68ce-021c-483a-ac50-b2429bced22c">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88fc7d9c68 @id="c6cf905a-ee69-44b4-bed6-e594e6b57bac">, #<Valkyrie::ID:0x00007f88f5f1f420 @id="722e68ce-021c-483a-ac50-b2429bced22c">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:375:in `block (5 levels) in <top (required)>'
10) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is unordered returns everything which references the given resource by the given property
Failure/Error: expect(query_service.find_inverse_references_by(resource: parent, property: :a_member_of).map(&:id).to_a).to contain_exactly child.id, child2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88f56642e0 @id="6cc5e3bd-09b0-4e77-8c20-b47f2a0fc588">, #<Valkyrie::ID:0x00007f88fc27cc48 @id="6ea6c975-e6d6-4f3a-93b6-5d33a595dbca">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88f56642e0 @id="6cc5e3bd-09b0-4e77-8c20-b47f2a0fc588">, #<Valkyrie::ID:0x00007f88fc27cc48 @id="6ea6c975-e6d6-4f3a-93b6-5d33a595dbca">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:331:in `block (5 levels) in <top (required)>'
11) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is ordered returns everything which references the given resource by the given property
Failure/Error: expect(query_service.find_inverse_references_by(resource: parent, property: :an_ordered_member_of).map(&:id).to_a).to contain_exactly child.id, child2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88f5fc8f48 @id="f8472c80-d92b-4c23-807a-ef9d6c31f17e">, #<Valkyrie::ID:0x00007f88f56e0b60 @id="58500586-ecb0-4d26-ad28-6221ae051676">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88f5fc8f48 @id="f8472c80-d92b-4c23-807a-ef9d6c31f17e">, #<Valkyrie::ID:0x00007f88f56e0b60 @id="58500586-ecb0-4d26-ad28-6221ae051676">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:349:in `block (5 levels) in <top (required)>'
12) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when id is passed instead of resource returns everything which references the given resource by the given property
Failure/Error: expect(query_service.find_inverse_references_by(id: parent.id, property: :a_member_of).map(&:id).to_a).to contain_exactly child.id, child2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88ff2cd140 @id="56717a2c-ba6b-47b7-a054-9370a68c8540">, #<Valkyrie::ID:0x00007f88fe2baed8 @id="c8bd162f-b858-4783-9532-f954970a99f5">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88ff2cd140 @id="56717a2c-ba6b-47b7-a054-9370a68c8540">, #<Valkyrie::ID:0x00007f88fe2baed8 @id="c8bd162f-b858-4783-9532-f954970a99f5">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:389:in `block (4 levels) in <top (required)>'
13) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_parents doesn't return same parent twice
Failure/Error: expect(query_service.find_parents(resource: child1).map(&:id).to_a).to contain_exactly parent.id, parent2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88f573fbb0 @id="0c9da398-edac-44ca-8fef-7e963352bad9">, #<Valkyrie::ID:0x00007f88fe329ab8 @id="bf4abf03-b69a-4816-b421-a9399be5cce7">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88f573fbb0 @id="0c9da398-edac-44ca-8fef-7e963352bad9">, #<Valkyrie::ID:0x00007f88fe329ab8 @id="bf4abf03-b69a-4816-b421-a9399be5cce7">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:455:in `block (3 levels) in <top (required)>'
14) Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_parents returns all parent resources
Failure/Error: expect(query_service.find_parents(resource: child1).map(&:id).to_a).to contain_exactly parent.id, parent2.id
expected collection contained: [#<Valkyrie::ID:0x00007f88ff2c0ee0 @id="6d7b95cc-a525-4117-b819-a51bd45ffc07">, #<Valkyrie::ID:0x00007f88fb775cf0 @id="6bfd8b97-2c17-486e-9ac6-c59c98a1ad3b">]
actual collection contained: []
the missing elements were: [#<Valkyrie::ID:0x00007f88ff2c0ee0 @id="6d7b95cc-a525-4117-b819-a51bd45ffc07">, #<Valkyrie::ID:0x00007f88fb775cf0 @id="6bfd8b97-2c17-486e-9ac6-c59c98a1ad3b">]
Shared Example Group: "a Valkyrie query provider" called from ./spec/valkyrie/persistence/fedora/query_service_spec.rb:12
# ./lib/valkyrie/specs/shared_specs/queries.rb:441:in `block (3 levels) in <top (required)>'
Finished in 41.79 seconds (files took 2.85 seconds to load)
1039 examples, 14 failures, 32 pending
Failed examples:
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:13:1] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_all_of_model returns all of that model
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:13:2] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_all_of_model returns an empty array if there are none
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:18:1:1] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_references_by when the property is unordered returns all references given in a property
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:18:1:3] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_references_by when the property is unordered removes duplicates
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:17:2:1:1] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .find_members filtering by model when the object has members returns all a resource's members in order
rspec ./spec/valkyrie/persistence/solr/query_service_spec.rb[1:1:23:1] # Valkyrie::Persistence::Solr::QueryService behaves like a Valkyrie query provider .count_all_of_model counts all of that model
rspec ./spec/valkyrie/storage/fedora_spec.rb[1:2:1:6] # Valkyrie::Storage::Fedora fedora 5 behaves like a Valkyrie::StorageAdapter can upload, validate, re-fetch, and delete a file
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:19:5:1:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by filtering by model when the object has related resources that match the filter returns only resources with the relationship filtered to the specified model
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:19:1:3:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is ordered for one child but not the other returns
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:19:1:1:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is unordered returns everything which references the given resource by the given property
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:19:1:2:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when the resource is saved when the property is ordered returns everything which references the given resource by the given property
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:19:2:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_inverse_references_by when id is passed instead of resource returns everything which references the given resource by the given property
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:20:3] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_parents doesn't return same parent twice
rspec ./spec/valkyrie/persistence/fedora/query_service_spec.rb[1:2:1:20:1] # Valkyrie::Persistence::Fedora::QueryService fedora 5 behaves like a Valkyrie query provider .find_parents returns all parent resources
Randomized with seed 13873
Coverage report generated for RSpec to /Users/escowles/src/valkyrie/coverage. 2562 / 2562 LOC (100.0%) covered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment