Skip to content

Commit

Permalink
MODS Export: subjects with term_type = 'technique' should export to a
Browse files Browse the repository at this point in the history
genre tag
  • Loading branch information
avatar382 committed Apr 10, 2018
1 parent 0646e6d commit 69ea928
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/app/exporters/serializers/mods.rb
Expand Up @@ -81,7 +81,7 @@ def serialize_mods_inner(mods, xml)
xml.temporal term
when 'uniform_title'
xml.titleInfo term
when 'genre_form', 'style_period'
when 'genre_form', 'style_period', 'technique'
xml.genre term
when 'occupation'
xml.occupation term
Expand Down
5 changes: 3 additions & 2 deletions backend/spec/export_mods_spec.rb
Expand Up @@ -35,7 +35,8 @@

@subject_person = create(:json_agent_person)

@subjects = (0..5).map { create(:json_subject) }
@subjects = (0..6).map { create(:json_subject) }
@subjects[6]['term_type'] = 'technique' # ensure at least one subject will be of type 'technique'

linked_agents = [{
:role => 'creator',
Expand Down Expand Up @@ -157,7 +158,7 @@
@mods.should have_tag "subject/temporal" => term['term']
when 'uniform_title'
@mods.should have_tag "subject/titleInfo" => term['term']
when 'genre_form', 'style_period'
when 'genre_form', 'style_period', 'technique'
@mods.should have_tag "subject/genre" => term['term']
when 'occupation'
@mods.should have_tag "subject/occupation" => term['term']
Expand Down

0 comments on commit 69ea928

Please sign in to comment.