[folks] tests: Fix EDS set-avatar test
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] tests: Fix EDS set-avatar test
- Date: Thu, 22 Jan 2015 17:40:51 +0000 (UTC)
commit 09bc2de85f6d32af895843362ad7f0c3ca8f1c0a
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Jan 22 17:32:02 2015 +0000
tests: Fix EDS set-avatar test
The same address book database was being re-used between unit tests,
causing the second one to fail with a duplicate contact UID.
tests/eds/set-avatar.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/tests/eds/set-avatar.vala b/tests/eds/set-avatar.vala
index e317e2f..9afba0e 100644
--- a/tests/eds/set-avatar.vala
+++ b/tests/eds/set-avatar.vala
@@ -39,6 +39,15 @@ public class SetAvatarTests : EdsTest.TestCase
this.test_set_individual_avatar);
}
+ private uint _test_num = 0;
+
+ public override void create_backend ()
+ {
+ /* Use a unique EDS book for each test. */
+ this.eds_backend = new EdsTest.Backend ();
+ ((!) this.eds_backend).set_up (true, "test%u".printf (this._test_num++));
+ }
+
void test_set_avatar ()
{
Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]