Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi
Commits
69ec2aff
Commit
69ec2aff
authored
Jan 31, 2019
by
David Faure
Browse files
Extend tagtest with more checks that the full tag information is sent.
No bug there, this passes.
parent
2c10e118
Changes
1
Hide whitespace changes
Inline
Side-by-side
autotests/libs/tagtest.cpp
View file @
69ec2aff
...
...
@@ -770,16 +770,20 @@ void TagTest::testMonitor()
}
{
QSignalSpy
modifedSpy
(
&
monitor
,
SIGNAL
(
tagChanged
(
Akonadi
::
Tag
)));
QVERIFY
(
modifedSpy
.
isValid
());
QSignalSpy
modif
i
edSpy
(
&
monitor
,
SIGNAL
(
tagChanged
(
Akonadi
::
Tag
)));
QVERIFY
(
modif
i
edSpy
.
isValid
());
createdTag
.
setName
(
QStringLiteral
(
"name3"
));
TagModifyJob
*
modJob
=
new
TagModifyJob
(
createdTag
,
this
);
AKVERIFYEXEC
(
modJob
);
//We usually pick up signals from the previous tests as well (due to server-side notification caching)
QTRY_VERIFY
(
modifedSpy
.
count
()
>=
1
);
QTRY_COMPARE
(
modifedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
().
id
(),
createdTag
.
id
());
QVERIFY
(
modifedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
().
hasAttribute
<
Akonadi
::
TagAttribute
>
());
QTRY_VERIFY
(
modifiedSpy
.
count
()
>=
1
);
QTRY_COMPARE
(
modifiedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
().
id
(),
createdTag
.
id
());
const
Akonadi
::
Tag
notifiedTag
=
modifiedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
();
QCOMPARE
(
notifiedTag
.
type
(),
createdTag
.
type
());
QCOMPARE
(
notifiedTag
.
gid
(),
createdTag
.
gid
());
QVERIFY
(
notifiedTag
.
hasAttribute
<
Akonadi
::
TagAttribute
>
());
QCOMPARE
(
notifiedTag
.
name
(),
createdTag
.
name
());
// requires the TagAttribute
}
{
...
...
@@ -789,6 +793,11 @@ void TagTest::testMonitor()
AKVERIFYEXEC
(
deletejob
);
QTRY_VERIFY
(
removedSpy
.
count
()
>=
1
);
QTRY_COMPARE
(
removedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
().
id
(),
createdTag
.
id
());
const
Akonadi
::
Tag
notifiedTag
=
removedSpy
.
last
().
first
().
value
<
Akonadi
::
Tag
>
();
QCOMPARE
(
notifiedTag
.
type
(),
createdTag
.
type
());
QCOMPARE
(
notifiedTag
.
gid
(),
createdTag
.
gid
());
QVERIFY
(
notifiedTag
.
hasAttribute
<
Akonadi
::
TagAttribute
>
());
QCOMPARE
(
notifiedTag
.
name
(),
createdTag
.
name
());
// requires the TagAttribute
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment