diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-13 09:05:31 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-13 09:05:31 +0200 |
commit | 88e8ed3cc36939f220a7051062dd203054d2ade6 (patch) | |
tree | 5aa945b338a051ee164c7f980e2ac75b680d737b /tests/accountstest.cpp | |
parent | b9ad9462df22a4d5c50ecb7c1c581c637f22ed61 (diff) | |
download | sink-88e8ed3cc36939f220a7051062dd203054d2ade6.tar.gz sink-88e8ed3cc36939f220a7051062dd203054d2ade6.zip |
Stop abusing the identifier property
Diffstat (limited to 'tests/accountstest.cpp')
-rw-r--r-- | tests/accountstest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp index 626a262..6f109f8 100644 --- a/tests/accountstest.cpp +++ b/tests/accountstest.cpp | |||
@@ -34,8 +34,6 @@ private slots: | |||
34 | QString accountName("name"); | 34 | QString accountName("name"); |
35 | QString accountIcon("icon"); | 35 | QString accountIcon("icon"); |
36 | auto account = ApplicationDomainType::createEntity<SinkAccount>(); | 36 | auto account = ApplicationDomainType::createEntity<SinkAccount>(); |
37 | //FIXME Get rid of this line | ||
38 | account.setProperty("identifier", account.identifier()); | ||
39 | account.setProperty("type", "maildir"); | 37 | account.setProperty("type", "maildir"); |
40 | account.setProperty("name", accountName); | 38 | account.setProperty("name", accountName); |
41 | account.setProperty("icon", accountIcon); | 39 | account.setProperty("icon", accountIcon); |
@@ -54,8 +52,6 @@ private slots: | |||
54 | QString smtpUsername("smtpUsername"); | 52 | QString smtpUsername("smtpUsername"); |
55 | QString smtpPassword("smtpPassword"); | 53 | QString smtpPassword("smtpPassword"); |
56 | auto resource = ApplicationDomainType::createEntity<SinkResource>(); | 54 | auto resource = ApplicationDomainType::createEntity<SinkResource>(); |
57 | //FIXME Get rid of this line | ||
58 | resource.setProperty("identifier", resource.identifier()); | ||
59 | resource.setProperty("type", "org.kde.mailtransport"); | 55 | resource.setProperty("type", "org.kde.mailtransport"); |
60 | resource.setProperty("account", account.identifier()); | 56 | resource.setProperty("account", account.identifier()); |
61 | resource.setProperty("server", smtpServer); | 57 | resource.setProperty("server", smtpServer); |
@@ -95,7 +91,11 @@ private slots: | |||
95 | auto model = Store::loadModel<SinkAccount>(query); | 91 | auto model = Store::loadModel<SinkAccount>(query); |
96 | QSignalSpy spy(model.data(), &QAbstractItemModel::rowsInserted); | 92 | QSignalSpy spy(model.data(), &QAbstractItemModel::rowsInserted); |
97 | QTRY_COMPARE(spy.count(), 1); | 93 | QTRY_COMPARE(spy.count(), 1); |
98 | Store::create(account).exec().waitForFinished(); | 94 | |
95 | auto account2 = ApplicationDomainType::createEntity<SinkAccount>(); | ||
96 | account2.setProperty("type", "maildir"); | ||
97 | account2.setProperty("name", "name"); | ||
98 | Store::create(account2).exec().waitForFinished(); | ||
99 | QTRY_COMPARE(spy.count(), 2); | 99 | QTRY_COMPARE(spy.count(), 2); |
100 | 100 | ||
101 | //Ensure the notifier only affects one type | 101 | //Ensure the notifier only affects one type |