[librest] tests: Fix lastfm test
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest] tests: Fix lastfm test
- Date: Mon, 18 Apr 2016 11:52:46 +0000 (UTC)
commit 3825a2b150972112627eebf5d1caaa095b90ee53
Author: Christophe Fergeau <cfergeau redhat com>
Date: Tue Oct 6 11:26:28 2015 +0200
tests: Fix lastfm test
Since August 17th 2015, user.getInfo no longer returns an 'id' node.
It's not clear whether that's a bug server-side, or a permanent change.
Since it has been 2 months already, make the 'id' node optional in the
lastfm test rather than having a hard failure when it's missing.
tests/lastfm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/lastfm.c b/tests/lastfm.c
index fba2fe2..b6af16e 100644
--- a/tests/lastfm.c
+++ b/tests/lastfm.c
@@ -71,8 +71,8 @@ main (int argc, char **argv)
g_assert (u_node);
node = rest_xml_node_find (u_node, "id");
- g_assert (node);
- g_assert_cmpstr (node->content, ==, "17038");
+ if (node != NULL)
+ g_assert_cmpstr (node->content, ==, "17038");
node = rest_xml_node_find (u_node, "name");
g_assert (node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]