[gom] tests: Ensure the error is related to the UNIQUE constraint
- From: Mathieu Bridon <mbridon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] tests: Ensure the error is related to the UNIQUE constraint
- Date: Fri, 9 May 2014 10:46:01 +0000 (UTC)
commit 29f7df636f9d3df3babc66cf3c7a4040f7ceaf90
Author: Mathieu Bridon <bochecha fedoraproject org>
Date: Fri May 9 18:33:10 2014 +0800
tests: Ensure the error is related to the UNIQUE constraint
tests/test-gom-constraints.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-gom-constraints.c b/tests/test-gom-constraints.c
index 9bfb8f6..bd9b763 100644
--- a/tests/test-gom-constraints.c
+++ b/tests/test-gom-constraints.c
@@ -224,6 +224,8 @@ test_unique (void)
NULL);
gom_resource_save_sync(GOM_RESOURCE(item), &error);
g_assert_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE);
+ g_assert_true (g_str_match_string ("UNIQUE", error->message, FALSE));
+ g_assert_true (g_str_match_string ("items.email", error->message, FALSE));
g_object_unref(item);
g_clear_error(&error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]