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.
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index 62fbb73..a02d1f8 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -116,6 +116,13 @@
 	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);
 }