Skip to content

Commit

Permalink
tests used Model::operator== in some tests
Browse files Browse the repository at this point in the history
 - removed todo tasks
  • Loading branch information
silverqx committed Aug 21, 2022
1 parent ccb8a9d commit 4197ec4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ void tst_Relations_Inserting_Updating::associate_WithModel() const
QVERIFY(verifyTorrent5->exists);
QCOMPARE(typeid (Torrent *), typeid (verifyTorrent5));
QVERIFY(verifyTorrent5->is(torrent));
// TEST ideal place for comparing models, verifyTorrent5 == torrent, have to have the same attribtues silverqx
QVERIFY(torrent == *verifyTorrent5);

file.save();

Expand All @@ -1371,7 +1371,7 @@ void tst_Relations_Inserting_Updating::associate_WithModel() const
QVERIFY(verifyTorrent5->exists);
QCOMPARE(typeid (Torrent *), typeid (verifyTorrent5));
QVERIFY(verifyTorrent5->is(torrent));
// TEST ideal place for comparing models, verifyTorrent5 == torrent, have to have the same attribtues silverqx
QVERIFY(torrent == *verifyTorrent5);

// Obtain file from the database and verify saved values
auto verifyFile = TorrentPreviewableFile::find(file[ID]);
Expand Down Expand Up @@ -1472,7 +1472,7 @@ void tst_Relations_Inserting_Updating::associate_WithId_ShouldUnsetRelation() co
QVERIFY(verifyTorrent5->exists);
QCOMPARE(typeid (Torrent *), typeid (verifyTorrent5));
QVERIFY(verifyTorrent5->is(torrent));
// TEST ideal place for comparing models, verifyTorrent5 == torrent, have to have the same attribtues silverqx
QVERIFY(torrent == *verifyTorrent5);

/* Have to unset current relationship, this is clearly visible in the Eqloquent's
associate implementation. */
Expand Down Expand Up @@ -1527,6 +1527,7 @@ void tst_Relations_Inserting_Updating::dissociate() const
QVERIFY(verifyTorrent5->exists);
QCOMPARE(typeid (Torrent *), typeid (verifyTorrent5));
QVERIFY(verifyTorrent5->is(torrent));
QVERIFY(torrent == *verifyTorrent5);

auto &fileRefDissociate = file.torrent()->dissociate();

Expand Down

0 comments on commit 4197ec4

Please sign in to comment.