Merge lp:~boiko/history-service/fix_tests into lp:history-service

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 202
Merged at revision: 201
Proposed branch: lp:~boiko/history-service/fix_tests
Merge into: lp:history-service
Prerequisite: lp:~tiagosh/history-service/fix-1485005
Diff against target: 61 lines (+10/-10)
2 files modified
tests/historyprivate/ContactMatcherTest.cpp (+6/-6)
tests/plugins/sqlite/SqlitePluginTest.cpp (+4/-4)
To merge this branch: bzr merge lp:~boiko/history-service/fix_tests
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+268551@code.launchpad.net

Commit message

Fix tests on vivid.

Description of the change

Fix tests on vivid.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~boiko/history-service/fix_tests updated
202. By Gustavo Pichorim Boiko

Tweak the phone numbers used in tests in an attempt to make the tests pass on vivid.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good. thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/historyprivate/ContactMatcherTest.cpp'
--- tests/historyprivate/ContactMatcherTest.cpp 2015-04-28 21:41:27 +0000
+++ tests/historyprivate/ContactMatcherTest.cpp 2015-08-19 22:28:39 +0000
@@ -58,10 +58,10 @@
5858
59 // create two contacts to test59 // create two contacts to test
60 QContactPhoneNumber phoneNumber;60 QContactPhoneNumber phoneNumber;
61 phoneNumber.setNumber("12345678");61 phoneNumber.setNumber("123456789");
62 QVERIFY(mPhoneContact.saveDetail(&phoneNumber));62 QVERIFY(mPhoneContact.saveDetail(&phoneNumber));
63 QContactPhoneNumber phoneNumber2;63 QContactPhoneNumber phoneNumber2;
64 phoneNumber2.setNumber("87654321");64 phoneNumber2.setNumber("7654321");
65 QVERIFY(mPhoneContact.saveDetail(&phoneNumber2));65 QVERIFY(mPhoneContact.saveDetail(&phoneNumber2));
66 QContactName name;66 QContactName name;
67 name.setFirstName("Phone");67 name.setFirstName("Phone");
@@ -71,7 +71,7 @@
7171
72 QContactExtendedDetail extendedDetail;72 QContactExtendedDetail extendedDetail;
73 extendedDetail.setName("x-mock-im");73 extendedDetail.setName("x-mock-im");
74 extendedDetail.setData("12345678");74 extendedDetail.setData("123456789");
75 QVERIFY(mExtendedContact.saveDetail(&extendedDetail));75 QVERIFY(mExtendedContact.saveDetail(&extendedDetail));
76 name.setFirstName("Extended");76 name.setFirstName("Extended");
77 name.setLastName("Generic Contact");77 name.setLastName("Generic Contact");
@@ -98,9 +98,9 @@
98 QTest::addColumn<QString>("contactId");98 QTest::addColumn<QString>("contactId");
99 QTest::addColumn<bool>("phoneNumberCompare");99 QTest::addColumn<bool>("phoneNumberCompare");
100100
101 QTest::newRow("match exact phone id") << QString("mock/ofono/account0") << QString("12345678") << mPhoneContact.id().toString() << false;101 QTest::newRow("match exact phone id") << QString("mock/ofono/account0") << QString("123456789") << mPhoneContact.id().toString() << false;
102 QTest::newRow("match phone number with prefix") << QString("mock/ofono/account0") << QString("+187654321") << mPhoneContact.id().toString() << true;102 QTest::newRow("match phone number with prefix") << QString("mock/ofono/account0") << QString("+10987654321") << mPhoneContact.id().toString() << true;
103 QTest::newRow("match exact extra id") << QString("mock/mock/account0") << QString("12345678") << mExtendedContact.id().toString() << false;103 QTest::newRow("match exact extra id") << QString("mock/mock/account0") << QString("123456789") << mExtendedContact.id().toString() << false;
104}104}
105105
106void ContactMatcherTest::testMatchExistingContact()106void ContactMatcherTest::testMatchExistingContact()
107107
=== modified file 'tests/plugins/sqlite/SqlitePluginTest.cpp'
--- tests/plugins/sqlite/SqlitePluginTest.cpp 2015-01-28 23:08:01 +0000
+++ tests/plugins/sqlite/SqlitePluginTest.cpp 2015-08-19 22:28:39 +0000
@@ -156,14 +156,14 @@
156 << (QStringList() << "second" << "first" << "third");156 << (QStringList() << "second" << "first" << "third");
157 QTest::newRow("phone number match with one participant") << "thePhoneAccount"157 QTest::newRow("phone number match with one participant") << "thePhoneAccount"
158 << History::EventTypeVoice158 << History::EventTypeVoice
159 << (QStringList() << "+1234567890")159 << (QStringList() << "+12345678901")
160 << History::MatchFlags(History::MatchPhoneNumber)160 << History::MatchFlags(History::MatchPhoneNumber)
161 << (QStringList() << "234567890");161 << (QStringList() << "2345678901");
162 QTest::newRow("phone number match with multiple participants") << "phoneAccount"162 QTest::newRow("phone number match with multiple participants") << "phoneAccount"
163 << History::EventTypeText163 << History::EventTypeText
164 << (QStringList() << "1234567" << "+19999999999")164 << (QStringList() << "12345678" << "+19999999999")
165 << History::MatchFlags(History::MatchPhoneNumber)165 << History::MatchFlags(History::MatchPhoneNumber)
166 << (QStringList() << "+55411234567" << "99999999");166 << (QStringList() << "+554112345678" << "9999999");
167}167}
168168
169void SqlitePluginTest::testThreadForParticipants()169void SqlitePluginTest::testThreadForParticipants()

Subscribers

People subscribed via source and target branches