[mb-commits] branch, mbs-5609, updated. MBS-5609, add a release relationship in the webservice tests.
MusicBrainz Git Server <[email protected]> Sat, 19 Jan 2013 13:55:26 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TwYtK-0004pr-AE@wiley> |
The branch, mbs-5609 has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=9542ec14eb6c3d72644a00ae004477a26ec2ab73 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8325438618c2756317eed62d117f694bb26aa227 (commit)
Summary of changes:
.../Server/Controller/WS/2/JSON/LookupRecording.pm | 36 ++++++++++++++++++++
.../Server/Controller/WS/2/LookupRecording.pm | 22 ++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9542ec14eb6c3d72644a00ae004477a26ec2ab73
Author: warp <[email protected]>
Date: Sat Jan 19 14:33:39 2013 +0100
MBS-5609, add a release relationship in the webservice tests.
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
index 5af7a27..12ae3e9 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRecording.pm
@@ -209,5 +209,41 @@ test 'recording lookup with puids and isrcs' => sub {
});
};
+test 'recording lookup with release relationships' => sub {
+
+ MusicBrainz::Server::Test->prepare_test_database(shift->c, '+webservice');
+
+ ws_test_json 'recording lookup with release relationships',
+ '/recording/37a8d72a-a9c9-4edc-9ecf-b5b58e6197a9?inc=release-rels' => encode_json (
+ {
+ id => "37a8d72a-a9c9-4edc-9ecf-b5b58e6197a9",
+ title => "Dear Diary",
+ disambiguation => "",
+ length => 86666,
+ relations => [
+ {
+ type => 'samples material',
+ direction => 'forward',
+ release => {
+ asin => JSON::null,
+ barcode => '634479663338',
+ country => JSON::null,
+ date => '2007-11-08',
+ disambiguation => '',
+ id => '4ccb3e54-caab-4ad4-94a6-a598e0e52eec',
+ packaging => JSON::null,
+ quality => 'normal',
+ status => JSON::null,
+ 'text-representation' => { language => JSON::null, script => JSON::null },
+ title => 'An Inextricable Tale Audiobook',
+ },
+ begin => '2008',
+ end => JSON::null,
+ ended => JSON::false,
+ }
+ ]
+ });
+};
+
1;
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
index 9f457d7..67b5577 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRecording.pm
@@ -151,6 +151,28 @@ ws_test 'recording lookup with puids and isrcs',
</recording>
</metadata>';
+ws_test 'recording lookup with release relationships',
+ '/recording/37a8d72a-a9c9-4edc-9ecf-b5b58e6197a9?inc=release-rels' =>
+ '<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://musicbrainz.org/ns/mmd-2.0#">
+ <recording id="37a8d72a-a9c9-4edc-9ecf-b5b58e6197a9">
+ <title>Dear Diary</title>
+ <length>86666</length>
+ <relation-list target-type="release">
+ <relation type="samples material">
+ <target>4ccb3e54-caab-4ad4-94a6-a598e0e52eec</target>
+ <begin>2008</begin>
+ <release id="4ccb3e54-caab-4ad4-94a6-a598e0e52eec">
+ <title>An Inextricable Tale Audiobook</title>
+ <quality>normal</quality>
+ <date>2007-11-08</date>
+ <barcode>634479663338</barcode>
+ </release>
+ </relation>
+ </relation-list>
+ </recording>
+</metadata>';
+
};
1;
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server