Skip to content

Commit

Permalink
tests for including events with dois. #390
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 2, 2020
1 parent 8111a32 commit a68264d
Show file tree
Hide file tree
Showing 9 changed files with 499 additions and 64 deletions.
6 changes: 4 additions & 2 deletions app/serializers/doi_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ class DoiSerializer

belongs_to :client, record_type: :clients
has_many :media, record_type: :media, id_method_name: :uid, if: Proc.new { |object, params| params && params[:detail] && !params[:is_collection]}
# has_many :views, record_type: :events, if: Proc.new { |object, params| params && params[:events]}
# has_many :downloads, record_type: :events, if: Proc.new { |object, params| params && params[:events]}
has_many :references, record_type: :references, id_method_name: :uid, serializer: EventSerializer
has_many :citations, record_type: :citations, id_method_name: :uid, serializer: EventSerializer
has_many :parts, record_type: :parts, id_method_name: :uid, serializer: EventSerializer
has_many :versions, record_type: :versions, id_method_name: :uid, serializer: EventSerializer

attribute :xml, if: Proc.new { |object, params| params && params[:detail] } do |object|
begin
Expand Down

This file was deleted.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/citations/has_citations.yml

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/downloads/has_downloads.yml

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/parts/has_parts.yml

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/references/has_references.yml

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/versions/has_versions.yml

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions spec/fixtures/vcr_cassettes/dois/views/has_views.yml

Large diffs are not rendered by default.

Loading

0 comments on commit a68264d

Please sign in to comment.