Skip to content

Commit

Permalink
added extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed May 6, 2020
1 parent d14ea08 commit b667934
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/factories/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
source_id { "datacite_related" }
source_token { "datacite_related_123" }
sequence(:subj_id) { |n| "http://doi.org/10.5061/DRYAD.47SD5e/#{n}" }
subj { { "datePublished" => "2006-06-13T16:14:19Z" } }
subj { { "date_published" => "2006-06-13T16:14:19Z", "registrant_id" => "datacite.datacite" } }
obj_id { "http://doi.org/10.5061/DRYAD.47SD5/1" }
relation_type_id { "references" }
end
Expand Down
9 changes: 9 additions & 0 deletions spec/models/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,13 @@
# end
# end
end

describe "camelcase_nested_objects" do
subject { create(:event_for_datacite_related) }

it "should transform keys" do
Event.camelcase_nested_objects(subject.uuid)
expect(subject.subj).to eq({"datePublished"=>"2006-06-13T16:14:19Z", "id"=>"https://doi.org/10.5061/dryad.47sd5e/1", "registrantId"=>"datacite.datacite"})
end
end
end

0 comments on commit b667934

Please sign in to comment.