summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Peña <alvaropg@gmail.com>2015-12-29 10:39:14 +0100
committerÁlvaro Peña <alvaropg@gmail.com>2015-12-29 10:39:14 +0100
commit97eaa56fa52f8975a0a957d7c435599f5bdcf1cb (patch)
tree03cad0dd5071695c0008c5b854c9c6b99718b81d
parente01e3f03a991071ce3c9867c81b10d5a893254c0 (diff)
downloadlibgfbgraph-97eaa56fa52f8975a0a957d7c435599f5bdcf1cb.tar.gz
GTest: Improved album assertions
-rw-r--r--tests/gtestutils.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/gtestutils.c b/tests/gtestutils.c
index da9bb48..3006bc0 100644
--- a/tests/gtestutils.c
+++ b/tests/gtestutils.c
@@ -225,6 +225,7 @@ gfbgraph_test_album (GFBGraphTestFixture *fixture, gconstpointer user_data)
GFBGraphUser *me;
GFBGraphAlbum *album;
GError *error = NULL;
+ gboolean result;
me = gfbgraph_user_get_me (GFBGRAPH_AUTHORIZER (fixture->authorizer), &error);
g_assert_no_error (error);
@@ -234,11 +235,16 @@ gfbgraph_test_album (GFBGraphTestFixture *fixture, gconstpointer user_data)
album = gfbgraph_album_new ();
gfbgraph_album_set_name (album, "Vanilla Sky");
gfbgraph_album_set_description (album, "Great sunset photos in Mars!");
- g_assert (gfbgraph_node_append_connection (GFBGRAPH_NODE (me),
- GFBGRAPH_NODE (album),
- GFBGRAPH_AUTHORIZER (fixture->authorizer),
- &error));
+ result = gfbgraph_node_append_connection (GFBGRAPH_NODE (me),
+ GFBGRAPH_NODE (album),
+ GFBGRAPH_AUTHORIZER (fixture->authorizer),
+ &error);
+ /* Asserting the connection */
g_assert_no_error (error);
+ g_assert (result);
+
+ /* Asserting the Album ID */
+ g_assert_cmpstr (gfbgraph_node_get_id (GFBGRAPH_NODE (album)), !=, "");
}
int