Skip to content

Commit b4fb44d

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into disableoauth1
2 parents a4ef4db + 970d5c6 commit b4fb44d

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Release/tests/Functional/http/client/oauth1_tests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ TEST(oauth1_token_accessors)
9090
TEST(oauth1_config_accessors)
9191
{
9292
oauth1_config t(U(""), U(""), U(""), U(""), U(""), U(""), oauth1_methods::hmac_sha1);
93-
TEST_ACCESSOR(U("Foo123"), consumer_key)
93+
TEST_ACCESSOR(U("Test123"), consumer_key)
9494
TEST_ACCESSOR(U("bar456"), consumer_secret)
9595
TEST_ACCESSOR(U("file:///123?123=a&1="), temp_endpoint)
9696
TEST_ACCESSOR(U("x:yxw#0"), auth_endpoint)
@@ -222,12 +222,12 @@ TEST_FIXTURE(oauth1_server_setup, oauth1_build_authorization_uri)
222222
// Reply with temporary token and secret.
223223
std::map<utility::string_t, utility::string_t> headers;
224224
headers[header_names::content_type] = mime_types::application_x_www_form_urlencoded;
225-
request->reply(status_codes::OK, U(""), headers, "oauth_token=foobar&oauth_token_secret=xyzzy&oauth_callback_confirmed=true");
225+
request->reply(status_codes::OK, U(""), headers, "oauth_token=testbar&oauth_token_secret=xyzzy&oauth_callback_confirmed=true");
226226
});
227227

228228
VERIFY_IS_FALSE(m_oauth1_config.token().is_valid_access_token());
229229
utility::string_t auth_uri = m_oauth1_config.build_authorization_uri().get();
230-
VERIFY_ARE_EQUAL(auth_uri, U("http://localhost:17778/?oauth_token=foobar"));
230+
VERIFY_ARE_EQUAL(auth_uri, U("http://localhost:17778/?oauth_token=testbar"));
231231
VERIFY_IS_FALSE(m_oauth1_config.token().is_valid_access_token());
232232
}
233233

@@ -253,7 +253,7 @@ TEST_FIXTURE(oauth1_server_setup, oauth1_token_from_redirected_uri)
253253
// Reply with access token and secret.
254254
std::map<utility::string_t, utility::string_t> headers;
255255
headers[header_names::content_type] = mime_types::application_x_www_form_urlencoded;
256-
request->reply(status_codes::OK, U(""), headers, "oauth_token=foo&oauth_token_secret=bar");
256+
request->reply(status_codes::OK, U(""), headers, "oauth_token=test&oauth_token_secret=bar");
257257
});
258258

259259
m_oauth1_config.set_token(oauth1_token(U("xyzzy"), U(""))); // Simulate temporary token.
@@ -262,7 +262,7 @@ TEST_FIXTURE(oauth1_server_setup, oauth1_token_from_redirected_uri)
262262
m_oauth1_config.token_from_redirected_uri(redirected_uri).wait();
263263

264264
VERIFY_IS_TRUE(m_oauth1_config.token().is_valid_access_token());
265-
VERIFY_ARE_EQUAL(m_oauth1_config.token().access_token(), U("foo"));
265+
VERIFY_ARE_EQUAL(m_oauth1_config.token().access_token(), U("test"));
266266
VERIFY_ARE_EQUAL(m_oauth1_config.token().secret(), U("bar"));
267267
}
268268

Release/tests/Functional/http/client/oauth2_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct oauth2_test_setup
5858
{
5959
oauth2_test_setup() :
6060
m_uri(U("http://localhost:16743/")),
61-
m_oauth2_config(U("123ABC"), U("456DEF"), U("https://foo"), m_uri.to_string(), U("https://bar")),
61+
m_oauth2_config(U("123ABC"), U("456DEF"), U("https://test1"), m_uri.to_string(), U("https://bar")),
6262
m_scoped(m_uri)
6363
{}
6464

@@ -125,16 +125,16 @@ TEST(oauth2_build_authorization_uri)
125125
// Full authorization URI with scope.
126126
{
127127
config.set_client_key(U("4567abcd"));
128-
config.set_auth_endpoint(U("https://foo"));
128+
config.set_auth_endpoint(U("https://test1"));
129129
config.set_redirect_uri(U("http://localhost:8080"));
130-
VERIFY_ARE_EQUAL(U("https://foo/?response_type=code&client_id=4567abcd&redirect_uri=http://localhost:8080&state=xyzzy&scope=testing_123"),
130+
VERIFY_ARE_EQUAL(U("https://test1/?response_type=code&client_id=4567abcd&redirect_uri=http://localhost:8080&state=xyzzy&scope=testing_123"),
131131
config.build_authorization_uri(false));
132132
}
133133

134134
// Verify again with implicit grant.
135135
{
136136
config.set_implicit_grant(true);
137-
VERIFY_ARE_EQUAL(U("https://foo/?response_type=token&client_id=4567abcd&redirect_uri=http://localhost:8080&state=xyzzy&scope=testing_123"),
137+
VERIFY_ARE_EQUAL(U("https://test1/?response_type=token&client_id=4567abcd&redirect_uri=http://localhost:8080&state=xyzzy&scope=testing_123"),
138138
config.build_authorization_uri(false));
139139
}
140140

@@ -210,7 +210,7 @@ TEST_FIXTURE(oauth2_test_setup, oauth2_token_from_redirected_uri)
210210
{
211211
std::map<utility::string_t, utility::string_t> headers;
212212
headers[header_names::content_type] = mime_types::application_json;
213-
request->reply(status_codes::OK, U(""), headers, "{\"access_token\":\"foo\",\"token_type\":\"bearer\"}");
213+
request->reply(status_codes::OK, U(""), headers, "{\"access_token\":\"test1\",\"token_type\":\"bearer\"}");
214214
});
215215

216216
m_oauth2_config.set_implicit_grant(false);
@@ -220,7 +220,7 @@ TEST_FIXTURE(oauth2_test_setup, oauth2_token_from_redirected_uri)
220220
m_oauth2_config.token_from_redirected_uri(redirected_uri).wait();
221221

222222
VERIFY_IS_TRUE(m_oauth2_config.token().is_valid_access_token());
223-
VERIFY_ARE_EQUAL(m_oauth2_config.token().access_token(), U("foo"));
223+
VERIFY_ARE_EQUAL(m_oauth2_config.token().access_token(), U("test1"));
224224
}
225225

226226
// Implicit grant.

Release/tests/Functional/json/parsing_tests.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ TEST(comments_string)
242242
json::value obj2 = json::value::parse(U("{/* A comment in the middle of an empty object */}"));
243243
VERIFY_IS_TRUE(obj2.is_object());
244244
VERIFY_ARE_EQUAL(0u, obj2.size());
245-
json::value obj3 = json::value::parse(U("{ \"foo\" : // A comment in the middle of a non-empty object\n 2}"));
245+
json::value obj3 = json::value::parse(U("{ \"test\" : // A comment in the middle of a non-empty object\n 2}"));
246246
VERIFY_IS_TRUE(obj3.is_object());
247247
VERIFY_ARE_EQUAL(1u, obj3.size());
248-
json::value obj4 = json::value::parse(U("{ \"foo\" : /* A comment in the middle of a non-empty object */ 2}"));
248+
json::value obj4 = json::value::parse(U("{ \"test\" : /* A comment in the middle of a non-empty object */ 2}"));
249249
VERIFY_IS_TRUE(obj4.is_object());
250250
VERIFY_ARE_EQUAL(1u, obj4.size());
251251

@@ -343,14 +343,14 @@ TEST(comments_stream)
343343
}
344344
{
345345
std::basic_stringstream<utility::char_t> stream;
346-
stream << U("{ \"foo\" : // A comment in the middle of a non-empty object\n 2}");
346+
stream << U("{ \"test1\" : // A comment in the middle of a non-empty object\n 2}");
347347
json::value obj3 = json::value::parse(stream);
348348
VERIFY_IS_TRUE(obj3.is_object());
349349
VERIFY_ARE_EQUAL(1u, obj3.size());
350350
}
351351
{
352352
std::basic_stringstream<utility::char_t> stream;
353-
stream << U("{ \"foo\" : /* A comment in the middle of a non-empty object */ 2}");
353+
stream << U("{ \"test1\" : /* A comment in the middle of a non-empty object */ 2}");
354354
json::value obj4 = json::value::parse(stream);
355355
VERIFY_IS_TRUE(obj4.is_object());
356356
VERIFY_ARE_EQUAL(1u, obj4.size());
@@ -410,13 +410,13 @@ TEST(bug_416116)
410410

411411
TEST(byte_ptr_parsing_array)
412412
{
413-
char s[] = "[ \"foo\",true]";
413+
char s[] = "[ \"test1\",true]";
414414
std::stringstream ss;
415415
ss << s;
416416
json::value v = json::value::parse(ss);
417417
auto s2 = v.serialize();
418418

419-
VERIFY_ARE_EQUAL(s2, U("[\"foo\",true]"));
419+
VERIFY_ARE_EQUAL(s2, U("[\"test1\",true]"));
420420

421421
std::stringstream os;
422422
v.serialize(os);
@@ -425,13 +425,13 @@ TEST(byte_ptr_parsing_array)
425425

426426
TEST(byte_ptr_parsing_object)
427427
{
428-
char s[] = "{\"foo\":true }";
428+
char s[] = "{\"test1\":true }";
429429
std::stringstream ss;
430430
ss << s;
431431
json::value v = json::value::parse(ss);
432432
auto s2 = v.serialize();
433433

434-
VERIFY_ARE_EQUAL(s2, U("{\"foo\":true}"));
434+
VERIFY_ARE_EQUAL(s2, U("{\"test1\":true}"));
435435

436436
std::stringstream os;
437437
v.serialize(os);

0 commit comments

Comments
 (0)