db: Extend the test to mark a SMS as delivered and verify it

Mark the SMS as delivered, then free it and try to get an
undelivered SMS to that subscriber again and make sure it
is failing.
This commit is contained in:
Holger Hans Peter Freyther 2014-12-25 17:27:15 +01:00
parent 98a95ac17f
commit be8e775776
1 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,13 @@ static void test_sms(void)
OSMO_ASSERT(sms->user_data_len == strlen("UserData123"));
OSMO_ASSERT(strcmp((char *) sms->user_data, "UserData123") == 0);
/* Mark the SMS as delivered */
db_sms_mark_delivered(sms);
sms_free(sms);
sms = db_sms_get_unsent_for_subscr(subscr);
OSMO_ASSERT(!sms);
subscr_put(subscr);
}