[gnome-software/wip/kalev/gnome-3-22: 57/96] trivial: Add unit tests for the update details from a flatpak remote
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/gnome-3-22: 57/96] trivial: Add unit tests for the update details from a flatpak remote
- Date: Tue, 7 Mar 2017 16:28:52 +0000 (UTC)
commit 24eadc3b0a2798d2685e65f12d0f8faf4af7d7b5
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 17 14:21:41 2017 +0000
trivial: Add unit tests for the update details from a flatpak remote
.../share/appdata/org.test.Chiron.appdata.xml | 8 ++++++++
src/gs-self-test.c | 5 +++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/tests/flatpak/chiron/files/share/appdata/org.test.Chiron.appdata.xml
b/data/tests/flatpak/chiron/files/share/appdata/org.test.Chiron.appdata.xml
index 69d96d7..b6d5138 100644
--- a/data/tests/flatpak/chiron/files/share/appdata/org.test.Chiron.appdata.xml
+++ b/data/tests/flatpak/chiron/files/share/appdata/org.test.Chiron.appdata.xml
@@ -8,4 +8,12 @@
<summary>Single line synopsis</summary>
<description><p>Long description.</p></description>
<url type="homepage">http://127.0.0.1/</url>
+ <releases>
+ <release date="2015-02-13" version="1.2.4">
+ <description><p>This is best.</p></description>
+ </release>
+ <release date="2014-12-15" version="1.2.3">
+ <description><p>This is better.</p></description>
+ </release>
+ </releases>
</component>
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 571e50b..ddee460 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -1104,6 +1104,11 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
GS_APP_KUDO_SANDBOXED_SECURE |
GS_APP_KUDO_SANDBOXED);
g_assert_cmpstr (gs_app_get_origin_hostname (app), ==, "");
+ g_assert_cmpstr (gs_app_get_update_version (app), ==, "1.2.4");
+ g_assert_cmpstr (gs_app_get_update_details (app), ==,
+ "Version 1.2.4:\nThis is best.\n\n"
+ "Version 1.2.3:\nThis is better.");
+ g_assert_cmpint (gs_app_get_update_urgency (app), ==, AS_URGENCY_KIND_UNKNOWN);
/* install, also installing runtime */
ret = gs_plugin_loader_app_action (plugin_loader, app,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]