Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrostasm <frost.asm@gmail.com>2017-12-17 00:26:51 +0300
committerfrostasm <frost.asm@gmail.com>2017-12-25 15:36:41 +0300
commited0bda98a684a764d8c1f00b97112624d2ae79ff (patch)
tree6e7dd028682e51bd2ba2f6855d87e00f528910e4 /tests/TestEntryModel.cpp
parent0c200d360be6dc1d3a59991fb8aad349ace334d1 (diff)
Fix failing entry model test for attachment name and size
Diffstat (limited to 'tests/TestEntryModel.cpp')
-rw-r--r--tests/TestEntryModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp
index e0c8bb490..ad7c9060a 100644
--- a/tests/TestEntryModel.cpp
+++ b/tests/TestEntryModel.cpp
@@ -122,9 +122,11 @@ void TestEntryModel::testAttachmentsModel()
entryAttachments->set("first", QByteArray("123"));
entryAttachments->set("2nd", QByteArray("456"));
- entryAttachments->set("2nd", QByteArray("789"));
+ entryAttachments->set("2nd", QByteArray("7890"));
- QCOMPARE(model->data(model->index(0, 0)).toString().left(4), QString("2nd "));
+ const int firstRow = 0;
+ QCOMPARE(model->data(model->index(firstRow, EntryAttachmentsModel::NameColumn)).toString(), QString("2nd"));
+ QCOMPARE(model->data(model->index(firstRow, EntryAttachmentsModel::SizeColumn), Qt::EditRole).toInt(), 4);
entryAttachments->remove("first");