summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2015-09-04 13:55:03 +0200
committerDebarshi Ray <debarshir@gnome.org>2015-09-07 20:50:22 +0200
commit093b9fbc3cd2f9a18dc1ff2584bfe42b43679275 (patch)
tree16e8f6699f30e2a118acdc175354cc65256f98a4
parent0c413dcc2c1a67504f9b039547e1733360414b69 (diff)
downloadlibgdata-093b9fbc3cd2f9a18dc1ff2584bfe42b43679275.tar.gz
tests: Remove redundant if-else branches
https://bugzilla.gnome.org/show_bug.cgi?id=684920
-rw-r--r--gdata/tests/calendar.c7
-rw-r--r--gdata/tests/contacts.c7
-rw-r--r--gdata/tests/tasks.c7
-rw-r--r--gdata/tests/youtube.c9
4 files changed, 4 insertions, 26 deletions
diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
index cfc6f5e3..03f51944 100644
--- a/gdata/tests/calendar.c
+++ b/gdata/tests/calendar.c
@@ -1349,12 +1349,7 @@ create_global_authorizer (void)
g_assert (authentication_uri != NULL);
/* Get the authorisation code off the user. */
- if (uhm_server_get_enable_online (mock_server)) {
- authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
- } else {
- /* Hard coded, extracted from the trace file. */
- authorisation_code = g_strdup ("4/hmXZtrXmXMqK1hwiWPZs9F_N6DK-.Ap4OICAUIe0WoiIBeO6P2m8IDoMxkQI");
- }
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
g_free (authentication_uri);
diff --git a/gdata/tests/contacts.c b/gdata/tests/contacts.c
index 41359420..48d7011a 100644
--- a/gdata/tests/contacts.c
+++ b/gdata/tests/contacts.c
@@ -2573,12 +2573,7 @@ create_global_authorizer (void)
g_assert (authentication_uri != NULL);
/* Get the authorisation code off the user. */
- if (uhm_server_get_enable_online (mock_server)) {
- authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
- } else {
- /* Hard coded, extracted from the trace file. */
- authorisation_code = g_strdup ("4/hmXZtrXmXMqK1hwiWPZs9F_N6DK-.Ap4OICAUIe0WoiIBeO6P2m8IDoMxkQI");
- }
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
g_free (authentication_uri);
diff --git a/gdata/tests/tasks.c b/gdata/tests/tasks.c
index 4f0f895a..7535c973 100644
--- a/gdata/tests/tasks.c
+++ b/gdata/tests/tasks.c
@@ -1317,12 +1317,7 @@ create_global_authorizer (void)
g_assert (authentication_uri != NULL);
/* Get the authorisation code off the user. */
- if (uhm_server_get_enable_online (mock_server)) {
- authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
- } else {
- /* Hard coded, extracted from the trace file. */
- authorisation_code = g_strdup ("4/hmXZtrXmXMqK1hwiWPZs9F_N6DK-.Ap4OICAUIe0WoiIBeO6P2m8IDoMxkQI");
- }
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
g_free (authentication_uri);
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 2b7ec65c..5fefbaf8 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -2355,14 +2355,7 @@ create_global_authorizer (void)
g_assert (authentication_uri != NULL);
/* Get the authorisation code off the user. */
- if (uhm_server_get_enable_online (mock_server)) {
- authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
- } else {
- /* Hard coded, extracted from the trace file. */
- authorisation_code = g_strdup ("4/bfJsBrDEyOMNyswDmC4nL45mtuS1E"
- "P9cy3-_5AijFA4.gsGq_HYYdZcRoiIB"
- "eO6P2m_QwbIXmgI");
- }
+ authorisation_code = gdata_test_query_user_for_verifier (authentication_uri);
g_free (authentication_uri);