aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ephy-migration-test.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-05-10 05:35:12 +0800
committerXan Lopez <xan@igalia.com>2012-05-10 05:35:12 +0800
commit6c611eade581a8668e48270b39dc757830ce23ad (patch)
tree85c9114827eea052dbc023ef4d31165a775b07e5 /tests/ephy-migration-test.c
parentd30b9aed33f491a430a79b36409655d2d45afa8d (diff)
downloadgsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar.gz
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar.bz2
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar.lz
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar.xz
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.tar.zst
gsoc2013-epiphany-6c611eade581a8668e48270b39dc757830ce23ad.zip
tests: test that trying to run an invalid migration step fails
Diffstat (limited to 'tests/ephy-migration-test.c')
-rw-r--r--tests/ephy-migration-test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/ephy-migration-test.c b/tests/ephy-migration-test.c
index 8acfdb461..3051f2d59 100644
--- a/tests/ephy-migration-test.c
+++ b/tests/ephy-migration-test.c
@@ -36,10 +36,19 @@ test_do_migration_simple (void)
{
gboolean ret;
- ret = ephy_profile_utils_do_migration ();
+ ret = ephy_profile_utils_do_migration (-1, TRUE);
g_assert (ret);
}
+static void
+test_do_migration_invalid (void)
+{
+ gboolean ret;
+
+ ret = ephy_profile_utils_do_migration (EPHY_PROFILE_MIGRATION_VERSION + 1, TRUE);
+ g_assert (ret == FALSE);
+}
+
int
main (int argc, char *argv[])
{
@@ -57,6 +66,8 @@ main (int argc, char *argv[])
g_test_add_func ("/lib/ephy-profile-utils/do_migration_simple",
test_do_migration_simple);
+ g_test_add_func ("/lib/ephy-profile-utils/do_migration_invalid",
+ test_do_migration_invalid);
return g_test_run ();
}