ddr-models 1.14.2 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe ModelsHelper, type: :helper do
4
+
5
+ describe 'admin_set_full_name' do
6
+ it "should call I18n to translate the slug" do
7
+ expect(I18n).to receive(:t).with('ddr.admin_set.foo')
8
+ helper.admin_set_full_name('foo')
9
+ end
10
+ end
11
+ end
@@ -56,6 +56,11 @@ RSpec.describe SolrDocument, type: :model do
56
56
  its(:local_id) { is_expected.to eq("abcdef") }
57
57
  end
58
58
 
59
+ describe "#admin_set" do
60
+ before { subject[Ddr::IndexFields::ADMIN_SET] = "foobar" }
61
+ its(:admin_set) { should eq("foobar") }
62
+ end
63
+
59
64
  describe "roles" do
60
65
  before do
61
66
  subject[Ddr::IndexFields::ACCESS_ROLE] = "[{\"type\":\"Editor\",\"scope\":\"policy\",\"agent\":\"Editors\"},{\"type\":\"Contributor\",\"scope\":\"resource\",\"agent\":\"bob@example.com\"}]"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddr-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.2
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Coble
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-07 00:00:00.000000000 Z
12
+ date: 2015-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -309,6 +309,7 @@ files:
309
309
  - Rakefile
310
310
  - app/controllers/users/omniauth_callbacks_controller.rb
311
311
  - app/controllers/users/sessions_controller.rb
312
+ - app/helpers/models_helper.rb
312
313
  - app/models/attachment.rb
313
314
  - app/models/collection.rb
314
315
  - app/models/component.rb
@@ -493,6 +494,7 @@ files:
493
494
  - spec/fixtures/sample.docx
494
495
  - spec/fixtures/sample.pdf
495
496
  - spec/fixtures/target.png
497
+ - spec/helpers/models_helper_spec.rb
496
498
  - spec/managers/derivatives_manager_spec.rb
497
499
  - spec/managers/role_manager_spec.rb
498
500
  - spec/models/active_fedora_base_spec.rb
@@ -622,6 +624,7 @@ test_files:
622
624
  - spec/fixtures/sample.docx
623
625
  - spec/fixtures/sample.pdf
624
626
  - spec/fixtures/target.png
627
+ - spec/helpers/models_helper_spec.rb
625
628
  - spec/managers/derivatives_manager_spec.rb
626
629
  - spec/managers/role_manager_spec.rb
627
630
  - spec/models/active_fedora_base_spec.rb