Skip to content

Commit

Permalink
Updating hydra-pcdm dependency and adding test coverage for member_of…
Browse files Browse the repository at this point in the history
…_collections method on Works
  • Loading branch information
escowles committed Nov 22, 2016
1 parent d41be82 commit 238a206
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hydra-works.gemspec
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_dependency 'hydra-pcdm', '>= 0.8'
spec.add_dependency 'hydra-pcdm', '>= 0.9'
spec.add_dependency 'hydra-derivatives', '~> 3.0'
spec.add_dependency 'hydra-file_characterization', '~> 0.3', '>= 0.3.3'
spec.add_dependency 'om', '~> 3.1'
Expand Down
12 changes: 12 additions & 0 deletions spec/hydra/works/models/work_spec.rb
Expand Up @@ -267,4 +267,16 @@ class DummyExtWork < Hydra::Works::Work
expect(work2.in_works).to eq [work1]
end
end

describe 'member_of_collections' do
let(:collection1) { Hydra::Works::Collection.create }
before do
work1.member_of_collections = [collection1]
end

it 'is a member of the collection' do
expect(work1.member_of_collections).to eq [collection1]
expect(work1.member_of_collection_ids).to eq [collection1.id]
end
end
end

0 comments on commit 238a206

Please sign in to comment.