aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-09-08 06:02:42 +0800
committerXan Lopez <xan@igalia.com>2012-09-08 06:02:42 +0800
commit8257cf80b4f63b44b995fa090a66e361dc35629d (patch)
tree6781e0a17e5fae2242dfde79868170f1b9fdb8a2
parente64f49f4080cff57af67eefd147e94d4223f2be1 (diff)
downloadgsoc2013-epiphany-8257cf80b4f63b44b995fa090a66e361dc35629d.tar.gz
gsoc2013-epiphany-8257cf80b4f63b44b995fa090a66e361dc35629d.tar.zst
gsoc2013-epiphany-8257cf80b4f63b44b995fa090a66e361dc35629d.zip
tests: test ephy_bookmarks_set_address
-rw-r--r--tests/ephy-bookmarks-test.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ephy-bookmarks-test.c b/tests/ephy-bookmarks-test.c
index 1fe273f63..03bdcf07f 100644
--- a/tests/ephy-bookmarks-test.c
+++ b/tests/ephy-bookmarks-test.c
@@ -76,6 +76,26 @@ test_ephy_bookmarks_add ()
clear_bookmark_files ();
}
+static void
+test_ephy_bookmarks_set_address ()
+{
+ EphyBookmarks *bookmarks;
+ EphyNode *node;
+
+ bookmarks = ephy_bookmarks_new ();
+ g_assert (bookmarks);
+ node = ephy_bookmarks_add (bookmarks, "GNOME", "http://www.gnome.org");
+ g_assert (node);
+ ephy_bookmarks_set_address (bookmarks, node, "http://www.google.com");
+ node = ephy_bookmarks_find_bookmark (bookmarks, "http://www.gnome.org");
+ g_assert (node == NULL);
+ node = ephy_bookmarks_find_bookmark (bookmarks, "http://www.google.com");
+ g_assert (node);
+
+ g_object_unref (bookmarks);
+ clear_bookmark_files ();
+}
+
int
main (int argc, char *argv[])
{
@@ -97,6 +117,9 @@ main (int argc, char *argv[])
g_test_add_func ("/src/bookmarks/ephy-bookmarks/add",
test_ephy_bookmarks_add);
+ g_test_add_func ("/src/bookmarks/ephy-bookmarks/set_address",
+ test_ephy_bookmarks_set_address);
+
ret = g_test_run ();
return ret;