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
1=== modified file 'tests/historyprivate/ContactMatcherTest.cpp'
2--- tests/historyprivate/ContactMatcherTest.cpp 2015-04-28 21:41:27 +0000
3+++ tests/historyprivate/ContactMatcherTest.cpp 2015-08-19 22:28:39 +0000
4@@ -58,10 +58,10 @@
5
6 // create two contacts to test
7 QContactPhoneNumber phoneNumber;
8- phoneNumber.setNumber("12345678");
9+ phoneNumber.setNumber("123456789");
10 QVERIFY(mPhoneContact.saveDetail(&phoneNumber));
11 QContactPhoneNumber phoneNumber2;
12- phoneNumber2.setNumber("87654321");
13+ phoneNumber2.setNumber("7654321");
14 QVERIFY(mPhoneContact.saveDetail(&phoneNumber2));
15 QContactName name;
16 name.setFirstName("Phone");
17@@ -71,7 +71,7 @@
18
19 QContactExtendedDetail extendedDetail;
20 extendedDetail.setName("x-mock-im");
21- extendedDetail.setData("12345678");
22+ extendedDetail.setData("123456789");
23 QVERIFY(mExtendedContact.saveDetail(&extendedDetail));
24 name.setFirstName("Extended");
25 name.setLastName("Generic Contact");
26@@ -98,9 +98,9 @@
27 QTest::addColumn<QString>("contactId");
28 QTest::addColumn<bool>("phoneNumberCompare");
29
30- QTest::newRow("match exact phone id") << QString("mock/ofono/account0") << QString("12345678") << mPhoneContact.id().toString() << false;
31- QTest::newRow("match phone number with prefix") << QString("mock/ofono/account0") << QString("+187654321") << mPhoneContact.id().toString() << true;
32- QTest::newRow("match exact extra id") << QString("mock/mock/account0") << QString("12345678") << mExtendedContact.id().toString() << false;
33+ QTest::newRow("match exact phone id") << QString("mock/ofono/account0") << QString("123456789") << mPhoneContact.id().toString() << false;
34+ QTest::newRow("match phone number with prefix") << QString("mock/ofono/account0") << QString("+10987654321") << mPhoneContact.id().toString() << true;
35+ QTest::newRow("match exact extra id") << QString("mock/mock/account0") << QString("123456789") << mExtendedContact.id().toString() << false;
36 }
37
38 void ContactMatcherTest::testMatchExistingContact()
39
40=== modified file 'tests/plugins/sqlite/SqlitePluginTest.cpp'
41--- tests/plugins/sqlite/SqlitePluginTest.cpp 2015-01-28 23:08:01 +0000
42+++ tests/plugins/sqlite/SqlitePluginTest.cpp 2015-08-19 22:28:39 +0000
43@@ -156,14 +156,14 @@
44 << (QStringList() << "second" << "first" << "third");
45 QTest::newRow("phone number match with one participant") << "thePhoneAccount"
46 << History::EventTypeVoice
47- << (QStringList() << "+1234567890")
48+ << (QStringList() << "+12345678901")
49 << History::MatchFlags(History::MatchPhoneNumber)
50- << (QStringList() << "234567890");
51+ << (QStringList() << "2345678901");
52 QTest::newRow("phone number match with multiple participants") << "phoneAccount"
53 << History::EventTypeText
54- << (QStringList() << "1234567" << "+19999999999")
55+ << (QStringList() << "12345678" << "+19999999999")
56 << History::MatchFlags(History::MatchPhoneNumber)
57- << (QStringList() << "+55411234567" << "99999999");
58+ << (QStringList() << "+554112345678" << "9999999");
59 }
60
61 void SqlitePluginTest::testThreadForParticipants()

Subscribers

People subscribed via source and target branches