Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2011-04-11 16:53:16 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5262af3f837c0d64baa6f710ce7b8a9c9e0136cf
5262af3f
1 parent
37007b7b
Fix test urls
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
Classes/Tests/ASIHTTPRequestTests.m
Classes/Tests/ASIHTTPRequestTests.m
View file @
5262af3
...
...
@@ -1036,10 +1036,10 @@
-
(
void
)
testBasicAuthentication
{
[
ASIHTTPRequest
removeCredentialsForHost
:
@"a
si
"
port
:
0
protocol
:
@"http"
realm
:
@"SECRET_STUFF"
];
[
ASIHTTPRequest
removeCredentialsForHost
:
@"a
llseeing-i.com
"
port
:
0
protocol
:
@"http"
realm
:
@"SECRET_STUFF"
];
[
ASIHTTPRequest
clearSession
];
NSURL
*
url
=
[
NSURL
URLWithString
:
@"http://a
si
/ASIHTTPRequest/tests/basic-authentication"
];
NSURL
*
url
=
[
NSURL
URLWithString
:
@"http://a
llseeing-i.com
/ASIHTTPRequest/tests/basic-authentication"
];
ASIHTTPRequest
*
request
;
BOOL
success
;
NSError
*
err
;
...
...
@@ -1088,7 +1088,7 @@
GHAssertNil
(
err
,
@"Failed to reuse credentials"
);
// Ensure new credentials are used in place of those in the session
request
=
[[[
ASIHTTPRequest
alloc
]
initWithURL
:[
NSURL
URLWithString
:
@"http://a
si
/ASIHTTPRequest/tests/basic-authentication-new-credentials"
]]
autorelease
];
request
=
[[[
ASIHTTPRequest
alloc
]
initWithURL
:[
NSURL
URLWithString
:
@"http://a
llseeing-i.com
/ASIHTTPRequest/tests/basic-authentication-new-credentials"
]]
autorelease
];
[
request
setUsername
:
@"secret_username_2"
];
[
request
setPassword
:
@"secret_password_2"
];
[
request
setUseSessionPersistence
:
YES
];
...
...
@@ -1434,7 +1434,7 @@
{
ASIHTTPRequest
*
request
=
[
ASIHTTPRequest
requestWithURL
:[
NSURL
URLWithString
:
@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"
]];
[
request
startSynchronous
];
BOOL
success
=
[[[
request
url
]
absoluteString
]
isEqualToString
:
@"http://www.apple.com
/
"
];
BOOL
success
=
[[[
request
url
]
absoluteString
]
isEqualToString
:
@"http://www.apple.com"
];
GHAssertTrue
(
success
,
@"Failed to redirect to a different domain"
);
}
...
...
Please
register
or
login
to post a comment