[libgdata/wip/rishi/drive: 1/4] tests: Remove redundant if-else branches
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/wip/rishi/drive: 1/4] tests: Remove redundant if-else branches
- Date: Fri, 4 Sep 2015 13:19:41 +0000 (UTC)
commit 6df4d882b022fa39a6d41a597fd52f9b033820f8
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Sep 4 13:55:03 2015 +0200
tests: Remove redundant if-else branches
https://bugzilla.gnome.org/show_bug.cgi?id=684920
gdata/tests/calendar.c | 7 +------
gdata/tests/contacts.c | 7 +------
gdata/tests/tasks.c | 7 +------
gdata/tests/youtube.c | 9 +--------
4 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
index cfc6f5e..03f5194 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 4135942..48d7011 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 4f0f895..7535c97 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 2b7ec65..5fefbaf 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]