Commit 8520eba7 authored by Travis Reitter's avatar Travis Reitter
Browse files

Add assertions about Telepathy writeable properties to our tests.

parent 1d5106a5
......@@ -98,6 +98,25 @@ public class IndividualPropertiesTests : Folks.TestCase
assert (i.groups.contains ("Montreal") == true);
assert (i.groups.contains ("Francophones") == true);
/* Check writeability of fields */
Tpf.Persona tpf_persona = null;
foreach (var p in i.personas)
{
if (p is Tpf.Persona)
{
tpf_persona = p as Tpf.Persona;
break;
}
}
assert (tpf_persona != null);
assert ("alias" in tpf_persona.writeable_properties);
assert ("is-favourite" in tpf_persona.writeable_properties);
assert ("groups" in tpf_persona.writeable_properties);
/* These are only writeable for the user contact */
assert (!tpf_persona.is_user);
assert (!("full-name" in tpf_persona.writeable_properties));
assert (!("phone-numbers" in tpf_persona.writeable_properties));
/* Check ContactInfo-provided properties */
assert (new PhoneFieldDetails ("+15142345678")
in i.phone_numbers);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment