2012-07-08 22:37:46 +00:00
|
|
|
# -*- encoding: utf-8 -*-
|
|
|
|
|
2012-07-04 13:10:47 +00:00
|
|
|
require "spec_helper"
|
|
|
|
|
|
|
|
describe MusicBrainz::Track do
|
|
|
|
it "gets no exception while loading release info" do
|
2015-03-13 19:39:11 +00:00
|
|
|
expect {
|
2012-07-04 13:10:47 +00:00
|
|
|
MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
2015-03-13 19:39:11 +00:00
|
|
|
}.to_not raise_error(Exception)
|
2012-07-04 13:10:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "gets correct instance" do
|
|
|
|
track = MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
2015-03-13 19:39:11 +00:00
|
|
|
expect(track).to be_an_instance_of(MusicBrainz::Track)
|
2012-07-04 13:10:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "gets correct track data" do
|
|
|
|
track = MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
2015-03-13 19:39:11 +00:00
|
|
|
expect(track.recording_id).to eq "b3015bab-1540-4d4e-9f30-14872a1525f7"
|
|
|
|
expect(track.title).to eq "Empire"
|
|
|
|
expect(track.length).to eq 233013
|
2012-07-04 13:10:47 +00:00
|
|
|
end
|
|
|
|
end
|