diff options
author | Fonic <fonic.maxxim@live.com> | 2017-12-19 13:10:32 +0300 |
---|---|---|
committer | Fonic <fonic.maxxim@live.com> | 2018-01-21 17:17:05 +0300 |
commit | 268035ff9e81d6d4689931346decb73d31d1e4f1 (patch) | |
tree | c88c3ea70973c4a364be329c0ad3ea6f54ff65d1 /tests/TestEntryModel.cpp | |
parent | 34a7ba4477b1d965807786f90a81583265c694bf (diff) |
Update entry model test to account for additional columns
Update comparison values of modelProxy->columnCount() to account for
additional columns 'Password', 'Notes', 'Expires', 'Created', 'Modified',
'Accessed' and 'Attachments'
Diffstat (limited to 'tests/TestEntryModel.cpp')
-rw-r--r-- | tests/TestEntryModel.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp index ad7c9060a..49ae3b0d1 100644 --- a/tests/TestEntryModel.cpp +++ b/tests/TestEntryModel.cpp @@ -288,9 +288,15 @@ void TestEntryModel::testProxyModel() modelSource->setGroup(db->rootGroup()); + /** + * @author Fonic <https://github.com/fonic> + * Update comparison value of modelProxy->columnCount() to account for + * additional columns 'Password', 'Notes', 'Expires', 'Created', 'Modified', + * 'Accessed' and 'Attachments' + */ QSignalSpy spyColumnRemove(modelProxy, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int))); modelProxy->hideColumn(0, true); - QCOMPARE(modelProxy->columnCount(), 3); + QCOMPARE(modelProxy->columnCount(), 10); QVERIFY(spyColumnRemove.size() >= 1); int oldSpyColumnRemoveSize = spyColumnRemove.size(); @@ -304,9 +310,15 @@ void TestEntryModel::testProxyModel() entryList << entry; modelSource->setEntryList(entryList); + /** + * @author Fonic <https://github.com/fonic> + * Update comparison value of modelProxy->columnCount() to account for + * additional columns 'Password', 'Notes', 'Expires', 'Created', 'Modified', + * 'Accessed' and 'Attachments' + */ QSignalSpy spyColumnInsert(modelProxy, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int))); modelProxy->hideColumn(0, false); - QCOMPARE(modelProxy->columnCount(), 4); + QCOMPARE(modelProxy->columnCount(), 11); QVERIFY(spyColumnInsert.size() >= 1); int oldSpyColumnInsertSize = spyColumnInsert.size(); |