exlibris-primo 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Exlibris
2
2
  module Primo
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -67,8 +67,15 @@ class RecordTest < Test::Unit::TestCase
67
67
  def testto_json_function
68
68
  VCR.use_cassette('record valid record') do
69
69
  record = Exlibris::Primo::Record.new(@setup_args)
70
- assert((record.to_json.is_a? String), "#{record.class} was expected to be a Hash, was #{record.to_json.class}")
71
- assert(record.to_json.starts_with? '{"record":{"control":{"sourcerecordid":"000062856","sourceid":"nyu_aleph","recordid":"nyu_aleph000062856","originalsourceid":"NYU01","ilsapiid":"NYU01000062856","sourceformat":"MARC21","sourcesystem":"Aleph"}')
70
+ assert((record.to_json.is_a? String), "#{record.class} was expected to be a String, was #{record.to_json.class}")
71
+ control_hash = JSON.parse(record.to_json)["record"]["control"]
72
+ assert_equal("000062856", control_hash["sourcerecordid"])
73
+ assert_equal("nyu_aleph", control_hash["sourceid"])
74
+ assert_equal("nyu_aleph000062856", control_hash["recordid"])
75
+ assert_equal("NYU01", control_hash["originalsourceid"])
76
+ assert_equal("NYU01000062856", control_hash["ilsapiid"])
77
+ assert_equal("MARC21", control_hash["sourceformat"])
78
+ assert_equal("Aleph", control_hash["sourcesystem"])
72
79
  end
73
80
  end
74
81
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exlibris-primo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -188,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
188
  version: '0'
189
189
  segments:
190
190
  - 0
191
- hash: -2827550050257447414
191
+ hash: 4382586349840720890
192
192
  required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  segments:
199
199
  - 0
200
- hash: -2827550050257447414
200
+ hash: 4382586349840720890
201
201
  requirements: []
202
202
  rubyforge_project:
203
203
  rubygems_version: 1.8.24