mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
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'
This commit is contained in:
parent
34a7ba4477
commit
268035ff9e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user