summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Gutierrez Segales <rgs@collabora.co.uk>2011-10-25 16:09:01 (GMT)
committerRaul Gutierrez Segales <rgs@collabora.co.uk>2011-10-25 19:56:38 (GMT)
commitd056e05720e7d21b1fbf310751024e3c904ea9d7 (patch)
tree2ca20e29cfb56eca9194429b751796b10b0ad03e
parentfa1c224d776759a4f421899f2324a2d132a59de3 (diff)
downloadfolks-d056e05720e7d21b1fbf310751024e3c904ea9d7.tar.gz
folks-d056e05720e7d21b1fbf310751024e3c904ea9d7.tar.xz
e-d-s: extend add-persona test to check for is-favourite
Helps: https://bugzilla.gnome.org/show_bug.cgi?id=660908
-rw-r--r--tests/eds/add-persona.vala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 9b2ed02..0aa3c17 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -106,6 +106,7 @@ public class AddPersonaTests : Folks.TestCase
this._properties_found.insert ("note", false);
this._properties_found.insert ("birthday", false);
this._properties_found.insert ("role-1", false);
+ this._properties_found.insert ("is-favourite", false);
this._test_add_persona_async ();
@@ -260,6 +261,12 @@ public class AddPersonaTests : Folks.TestCase
details.insert (Folks.PersonaStore.detail_key (PersonaDetail.ROLES),
(owned) v10);
+ Value? v11 = Value (typeof (bool));
+ v11.set_boolean (true);
+ details.insert (
+ Folks.PersonaStore.detail_key (PersonaDetail.IS_FAVOURITE),
+ (owned) v11);
+
try
{
yield this._aggregator.add_persona_from_details (null,
@@ -317,6 +324,7 @@ public class AddPersonaTests : Folks.TestCase
i.notify["notes"].disconnect (this._notify_cb);
i.notify["birthday"].disconnect (this._notify_cb);
i.notify["roles"].disconnect (this._notify_cb);
+ i.notify["is-favourite"].disconnect (this._notify_cb);
this._properties_found.remove_all ();
}
@@ -334,6 +342,7 @@ public class AddPersonaTests : Folks.TestCase
i.notify["notes"].connect (this._notify_cb);
i.notify["birthday"].connect (this._notify_cb);
i.notify["roles"].connect (this._notify_cb);
+ i.notify["is-favourite"].connect (this._notify_cb);
this._check_properties (i);
}
@@ -456,6 +465,11 @@ public class AddPersonaTests : Folks.TestCase
this._properties_found.replace ("role-1", true);
}
+ if (i.is_favourite)
+ {
+ this._properties_found.replace ("is-favourite", true);
+ }
+
this._exit_if_all_properties_found ();
}