Skip to content

Commit

Permalink
Merge pull request #12 from lionelerard/master
Browse files Browse the repository at this point in the history
Add profile and data_quality to artist
  • Loading branch information
buntine committed Dec 2, 2012
2 parents 4ecc7f4 + 15a15bb commit da351a1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/wrapper/resources/artist.rb
Expand Up @@ -11,7 +11,9 @@ class Discogs::Artist < Discogs::Resource
:namevariations,
:aliases,
:members,
:releases
:releases,
:profile,
:data_quality

def main_releases
filter_releases("Main")
Expand Down
2 changes: 2 additions & 0 deletions spec/samples/valid_artist.xml
Expand Up @@ -7,6 +7,8 @@
</images>
<name>Root</name>
<realname>Rootan</realname>
<profile>Richard David James was born to Welsh parents</profile>
<data_quality>Needs Vote</data_quality>
<urls>
<url>http://www.root.net</url>
<url>http://www.rootan.com</url>
Expand Down
8 changes: 8 additions & 0 deletions spec/wrapper_methods/get_artist_spec.rb
Expand Up @@ -30,6 +30,14 @@
@artist.realname.should == "Rootan"
end

it "should have a profile attribute" do
@artist.profile.should == "Richard David James was born to Welsh parents"
end

it "should have a data_quality attribute" do
@artist.data_quality.should == "Needs Vote"
end

it "should have one or more aliases" do
@artist.aliases.should be_instance_of(Array)
@artist.aliases[0].should == "Roooot"
Expand Down

0 comments on commit da351a1

Please sign in to comment.