Sha256: f9923bc395afd4e27c255e6d52b0a81c0c36aee745cfa74cd9cb15072cb0b312
Contents?: true
Size: 1.64 KB
Versions: 3
Compression:
Stored size: 1.64 KB
Contents
require_relative '../test_helper' require 'metal_archives/parsers/band' ## # Property testing # # If a test fails, please check the online results to make sure it's not # the content itself that has changed. # class ArtistPropertyTest < Test::Unit::TestCase def test_basic_attributes artist = MetalArchives::Artist.find 60908 assert_instance_of MetalArchives::Artist, artist assert_equal 60908, artist.id assert_equal 'Alberto Rionda', artist.name assert_empty artist.aliases assert_equal ISO3166::Country['ES'], artist.country assert_equal 'Oviedo, Asturias', artist.location assert_equal Date.new(1972, 9, 2), artist.date_of_birth assert_equal :male, artist.gender assert_match 'Avalanch', artist.biography assert_match 'Sanctuarium Estudios', artist.trivia artist = MetalArchives::Artist.find 260 assert_instance_of MetalArchives::Artist, artist assert_equal 'Ian Fraser Kilmister', artist.name assert_equal ['Lemmy Kilmister'], artist.aliases assert_equal Date.new(2015, 12, 28), artist.date_of_death assert_equal 4, artist.links.length assert_equal 1, artist.links.count { |l| l[:type] == :official } assert_equal 2, artist.links.count { |l| l[:type] == :unofficial } assert_equal 1, artist.links.count { |l| l[:type] == :unlisted_bands } assert_equal 'https://www.facebook.com/OfficialLemmy', artist.links.select { |l| l[:type] == :official }.first[:url] assert_equal 'Facebook', artist.links.select { |l| l[:type] == :official }.first[:title] end def test_map_params assert_equal 'name', MetalArchives::Parsers::Artist.map_params(:name => 'name')[:query] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metal_archives-0.5.0 | test/property/artist_property_test.rb |
metal_archives-0.4.0 | test/property/artist_property_test.rb |
metal_archives-0.3.0 | test/property/artist_property_test.rb |