Sha256: 8891122c52c65dfa646717fc3ff0371c51a73afdbdff1773c8609b9eac87a866

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

# -*- encoding: utf-8 -*-

require "spec_helper"

describe MusicBrainz::Release do
  it "gets no exception while loading release info" do
    lambda {
      MusicBrainz::Release.find("2225dd4c-ae9a-403b-8ea0-9e05014c778f")
    }.should_not raise_error(Exception)
  end

  it "gets correct instance" do
    release = MusicBrainz::Release.find("2225dd4c-ae9a-403b-8ea0-9e05014c778f")
    release.should be_an_instance_of(MusicBrainz::Release)
  end

  it "gets correct release data" do
    release = MusicBrainz::Release.find("2225dd4c-ae9a-403b-8ea0-9e05014c778f")
    release.id.should == "2225dd4c-ae9a-403b-8ea0-9e05014c778f"
    release.title.should == "Empire"
    release.status.should == "Official"
    release.date.should == Time.utc(2006, 8, 28)
    release.country.should == "GB"
  end

  it "gets correct release tracks" do
    tracks = MusicBrainz::Release.find("2225dd4c-ae9a-403b-8ea0-9e05014c778f").tracks
    tracks.length.should == 11
    tracks.first.position.should == 1
    tracks.first.recording_id.should == "b3015bab-1540-4d4e-9f30-14872a1525f7"
    tracks.first.title.should == "Empire"
    tracks.first.length.should == 233013
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
musicbrainz-0.7.1 spec/requests/release_spec.rb
musicbrainz-0.7.0 spec/requests/release_spec.rb