Skip to content

Commit

Permalink
Merge pull request #610 from projecthydra/pending
Browse files Browse the repository at this point in the history
Describing bugs with pending tests
  • Loading branch information
jcoyne committed Dec 3, 2014
2 parents 3e343fa + 22574cc commit d90da9b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
28 changes: 22 additions & 6 deletions spec/integration/attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class PropertiesDatastream < ActiveFedora::OmDatastream
set_terminology do |t|
t.root(path: "fields")
t.depositor index_as: [:symbol, :stored_searchable]
t.wrangler index_as: [:facetable]
end
end
class TitledObject < ActiveFedora::Base
Expand All @@ -17,6 +18,7 @@ class TitledObject < ActiveFedora::Base
class RdfObject < ActiveFedora::Base
contains 'foo', class_name: 'PropertiesDatastream'
has_attributes :depositor, datastream: :foo, multiple: false
has_attributes :wrangler, datastream: :foo, multiple: true
property :resource_type, predicate: ::RDF::DC.type do |index|
index.as :stored_searchable, :facetable
end
Expand Down Expand Up @@ -47,7 +49,7 @@ class RdfObject < ActiveFedora::Base
end
end

context "with an rdf property" do
context "with multiple datastreams" do

subject { RdfObject.create }

Expand All @@ -71,22 +73,36 @@ class RdfObject < ActiveFedora::Base
end

describe "setting attributes" do

after do
expect(subject.depositor).to eql("foo")
expect(subject.resource_type).to eql(["bar"])
end

specify "using strings for keys" do
subject["depositor"] = "foo"
subject["resource_type"] = "bar"
subject.save
expect(subject.depositor).to eql("foo")
expect(subject.resource_type).to eql(["bar"])
end
specify "using symbols for keys" do
subject[:depositor] = "foo"
subject[:resource_type] = "bar"
subject.save
expect(subject.depositor).to eql("foo")
expect(subject.resource_type).to eql(["bar"])
end

# TODO: bug logged in issue #540
describe "using shift", pending: "has_changed? not returning true" do
specify "with rdf properties" do
subject.resource_type << "bar"
subject.save
expect(subject.resource_type).to eql(["bar"])
end
specify "with om terms" do
subject.wrangler << "bar"
subject.save
expect(subject.wrangler).to eql(["bar"])
end
end

end

end
Expand Down
9 changes: 9 additions & 0 deletions spec/integration/collection_association_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@ class Book < ActiveFedora::Base
end
end
end

# TODO: Bug described in issue #609
describe "#select" do
it "should choose a subset of objects in the relationship" do
pending "method has private visibility"
expect(library.books.select([:id])).to include(book1.id)
end
end

end

0 comments on commit d90da9b

Please sign in to comment.