[libgfbgraph] GTest: Improved album assertions
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgfbgraph] GTest: Improved album assertions
- Date: Tue, 29 Dec 2015 09:40:17 +0000 (UTC)
commit 97eaa56fa52f8975a0a957d7c435599f5bdcf1cb
Author: Álvaro Peña <alvaropg gmail com>
Date: Tue Dec 29 10:39:14 2015 +0100
GTest: Improved album assertions
tests/gtestutils.c | 14 ++++++++++----
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]