From 6c611eade581a8668e48270b39dc757830ce23ad Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Wed, 9 May 2012 23:35:12 +0200 Subject: tests: test that trying to run an invalid migration step fails --- tests/ephy-migration-test.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/ephy-migration-test.c') 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 (); } -- cgit v1.2.3