Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

updated test_connect_success to use http://example.iana.org/ #18

Merged
merged 1 commit into from
Jul 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions http_client.rc
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,17 @@ pub fn test_connect_error() {
#[allow(non_implicitly_copyable_typarams)]
pub fn test_connect_success() {
use extra::net::url;
let url = url::from_str("http://example.com/").get();
let url = url::from_str("http://example.iana.org/").get();
let mut request = uv_http_request(url);
let events = sequence(&mut request);

for events.iter().advance |ev| {
match *ev {
Error(*) => { fail!() },
Status(status) => match status {
StatusOk => { fail!(~"status OK, expected found (302)") },
StatusFound => { },
StatusUnknown => { fail!(~"status unknown, expected found (302)") }
StatusOk => { },
StatusFound => { fail!(~"status found, expected OK (200)") },
StatusUnknown => { fail!(~"status unknown, expected OK (200)") }
},
_ => { }
}
Expand Down