|
@@ -139,6 +139,24 @@ TEST_F(CCSessionTest, notify) {
|
|
|
session.getMsgQueue()->get(1)->toWire();
|
|
|
}
|
|
|
|
|
|
+// Test sending a notification
|
|
|
+TEST_F(CCSessionTest, notifyNoParams) {
|
|
|
+ ModuleCCSession mccs(ccspecfile("spec1.spec"), session, NULL, NULL, false,
|
|
|
+ false);
|
|
|
+ mccs.notify("group", "event");
|
|
|
+ const ConstElementPtr notification(el(
|
|
|
+ "["
|
|
|
+ " \"notifications/group\","
|
|
|
+ " \"*\","
|
|
|
+ " {"
|
|
|
+ " \"notification\": [\"event\"]"
|
|
|
+ " },"
|
|
|
+ " -1"
|
|
|
+ "]"));
|
|
|
+ EXPECT_TRUE(notification->equals(*session.getMsgQueue()->get(1))) <<
|
|
|
+ session.getMsgQueue()->get(1)->toWire();
|
|
|
+}
|
|
|
+
|
|
|
TEST_F(CCSessionTest, createAnswer) {
|
|
|
ConstElementPtr answer;
|
|
|
answer = createAnswer();
|