Commit b6a67cc5 authored by Álvaro Peña's avatar Álvaro Peña

GTest: A test for the creation of an Album

parent f77583f4
......@@ -205,6 +205,28 @@ gfbgraph_test_me (GFBGraphTestFixture *fixture, gconstpointer user_data)
g_object_unref (me);
}
static void
gfbgraph_test_album (GFBGraphTestFixture *fixture, gconstpointer user_data)
{
GFBGraphUser *me;
GFBGraphAlbum *album;
GError *error = NULL;
me = gfbgraph_user_get_me (GFBGRAPH_AUTHORIZER (fixture->authorizer), &error);
g_assert_no_error (error);
g_assert (GFBGRAPH_IS_USER (me));
/* Create a photo album */
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));
g_assert_no_error (error);
}
int
main (int argc, char **argv)
{
......@@ -222,6 +244,13 @@ main (int argc, char **argv)
gfbgraph_test_me,
gfbgraph_test_fixture_teardown);
g_test_add ("/GFBGraph/Album",
GFBGraphTestFixture,
app,
gfbgraph_test_fixture_setup,
gfbgraph_test_album,
gfbgraph_test_fixture_teardown);
test_result = g_test_run ();
if (app) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment