Commit fbfa00a3 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Notifications/Notification): add spec file

parent 91bb74c2
......@@ -112,7 +112,7 @@ void Notifier::showCallMessage (
);
// Destroy it after timeout.
QTimer::singleShot(timeout, this, [object,this]() {
QTimer::singleShot(timeout, this, [object, this]() {
delete object;
m_mutex.lock();
......
import QtTest 1.1
import Linphone 1.0
import Utils 1.0
// ===================================================================
// Check defined properties/methods used in `Notifier.cpp`.
TestCase {
Notification {
id: notification
}
function test_notificationHeightProperty () {
compare(Utils.isInteger(notification.notificationHeight), true)
}
function test_notificationOffsetProperty () {
compare(Utils.isInteger(notification.notificationOffset), true)
}
function test_notificationShowMethod () {
compare(Utils.isFunction(notification.show), true)
}
}
......@@ -365,6 +365,18 @@ function isArray (array) {
// -------------------------------------------------------------------
function isFunction (func) {
return typeof func === 'function'
}
// -------------------------------------------------------------------
function isInteger (integer) {
return integer === parseInt(integer, 10)
}
// -------------------------------------------------------------------
function isString (string) {
return typeof string === 'string' || string instanceof String
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment