scenarios/testy.rb
# Allows us to load other scenarios
Allows us to load other scenarios
Allows us to load other scenarios
def build_big_tc(testy)
  build_taxon_concept(
    :parent_hierarchy_entry_id => testy[:empty_taxon_concept].hierarchy_entries.first.id,
    :rank            => 'species',
    :canonical_form  => testy[:canonical_form],
    :ranked_canonical_form => testy[:ranked_canonical_form],
    :attribution     => testy[:attribution],
    :scientific_name => testy[:scientific_name],
    :italicized      => testy[:italicized],
    :iucn_status     => testy[:iucn_status],
    :map             => {:description => testy[:map_text]},
    :flash           => [{:description => testy[:video_1_text]}, {:description => testy[:video_2_text]}],
    :youtube         => [{:description => testy[:video_3_text]}],
    :comments        => [{:user => testy[:user], :body => testy[:comment_1]},
                         {:user => testy[:user], :body => testy[:comment_bad]},
                         {:user => testy[:user], :body => testy[:comment_2]}],
    :images          => [{:object_cache_url => testy[:image_1], :data_rating => 2},
                         {:object_cache_url => testy[:image_2], :data_rating => 3},
                         {:object_cache_url => testy[:image_untrusted], :vetted => Vetted.untrusted},
                         {:object_cache_url => testy[:image_3], :data_rating => 4},
                         {:object_cache_url => testy[:image_unknown_trust], :vetted => Vetted.unknown},
                         {}, {}, {}, {}, {}, {}], 
    :toc             => [{:toc_item => testy[:overview], :description => testy[:overview_text]},
                         {:toc_item => testy[:brief_summary], :description => testy[:brief_summary_text]},
                         {:toc_item => testy[:education], :description => testy[:education_text]},
                         {:toc_item => testy[:toc_item_2]}, {:toc_item => testy[:toc_item_3]}, {:toc_item => testy[:toc_item_3]}]
  )
end
def build_big_tc ( testy ) build_taxon_concept ( :parent_hierarchy_entry_id => testy [ :empty_taxon_concept ] . hierarchy_entries . first . id , :rank => 'species' , :canonical_form => testy [ :canonical_form ] , :ranked_canonical_form => testy [ :ranked_canonical_form ] , :attribution => testy [ :attribution ] , :scientific_name => testy [ :scientific_name ] , :italicized => testy [ :italicized ] , :iucn_status => testy [ :iucn_status ] , :map => { :description => testy [ :map_text ] } , :flash => [ { :description => testy [ :video_1_text ] } , { :description => testy [ :video_2_text ] } ] , :youtube => [ { :description => testy [ :video_3_text ] } ] , :comments => [ { :user => testy [ :user ] , :body => testy [ :comment_1 ] } , { :user => testy [ :user ] , :body => testy [ :comment_bad ] } , { :user => testy [ :user ] , :body => testy [ :comment_2 ] } ] , :images => [ { :object_cache_url => testy [ :image_1 ] , :data_rating => 2 } , { :object_cache_url => testy [ :image_2 ] , :data_rating => 3 } , { :object_cache_url => testy [ :image_untrusted ] , :vetted => Vetted . untrusted } , { :object_cache_url => testy [ :image_3 ] , :data_rating => 4 } , { :object_cache_url => testy [ :image_unknown_trust ] , :vetted => Vetted . unknown } , { } , { } , { } , { } , { } , { } ] , :toc => [ { :toc_item => testy [ :overview ] , :description => testy [ :overview_text ] } , { :toc_item => testy [ :brief_summary ] , :description => testy [ :brief_summary_text ] } , { :toc_item => testy [ :education ] , :description => testy [ :education_text ] } , { :toc_item => testy [ :toc_item_2 ] } , { :toc_item => testy [ :toc_item_3 ] } , { :toc_item => testy [ :toc_item_3 ] } ] ) end
Allows us to load other scenarios
Allows us to load other scenarios
# We want more than 10 images, to test pagination, but the details don't mattr
testy
<not_specific>