summaryrefslogtreecommitdiffstats
path: root/tests/accountstest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-13 10:58:20 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-13 10:58:20 +0200
commitc3040251dd4d9e8d00cbccdeb693b11a72077c73 (patch)
treec451f523d434871f8607dc74d3dd902964b93357 /tests/accountstest.cpp
parent88e8ed3cc36939f220a7051062dd203054d2ade6 (diff)
downloadsink-c3040251dd4d9e8d00cbccdeb693b11a72077c73.tar.gz
sink-c3040251dd4d9e8d00cbccdeb693b11a72077c73.zip
Fixed identity lookup
Diffstat (limited to 'tests/accountstest.cpp')
-rw-r--r--tests/accountstest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp
index 6f109f8..12e4685 100644
--- a/tests/accountstest.cpp
+++ b/tests/accountstest.cpp
@@ -68,6 +68,18 @@ private slots:
68 }) 68 })
69 .exec().waitForFinished(); 69 .exec().waitForFinished();
70 70
71 auto identity = ApplicationDomainType::createEntity<Identity>();
72 identity.setProperty("name", smtpServer);
73 identity.setProperty("address", smtpUsername);
74 identity.setProperty("account", account.identifier());
75 Store::create(identity).exec().waitForFinished();
76
77 Store::fetchAll<Identity>(Query()).then<void, QList<Identity::Ptr>>([&](const QList<Identity::Ptr> &identities) {
78 QCOMPARE(identities.size(), 1);
79 })
80 .exec().waitForFinished();
81
82
71 Store::remove(resource).exec().waitForFinished(); 83 Store::remove(resource).exec().waitForFinished();
72 84
73 Store::fetchAll<SinkResource>(Query()).then<void, QList<SinkResource>>([](const QList<SinkResource> &resources) { 85 Store::fetchAll<SinkResource>(Query()).then<void, QList<SinkResource>>([](const QList<SinkResource> &resources) {