Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
9b828adf
Commit
9b828adf
authored
Apr 03, 2019
by
Daniel Brüning
Browse files
small changes
parent
a78d7ea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.rs
View file @
9b828adf
...
...
@@ -361,9 +361,6 @@ mod tests {
let
mut
client
=
reqwest
::
Client
::
new
()
.unwrap
();
client
.redirect
(
reqwest
::
RedirectPolicy
::
custom
(|
attempt
|
{
attempt
.stop
()}));
let
mut
resp
=
login_and_fn
(
8083
,
&
client
,
"testusr"
,
"testpw"
);
let
mut
content
=
String
::
new
();
resp
.read_to_string
(
&
mut
content
);
assert
!
(
!
content
.contains
(
"Error"
));
let
header
=
resp
.headers
();
let
setCookie
=
header
.get
::
<
reqwest
::
header
::
SetCookie
>
();
...
...
@@ -371,11 +368,10 @@ mod tests {
None
=>
panic!
(
"No setCookie."
),
Some
(
cookie
)
=>
if
cookie
.len
()
==
1
{
let
newCookie
=
reqwest
::
header
::
Cookie
(
cookie
.to_vec
());
let
newCookie2
=
newCookie
.clone
();
let
mut
newResp
=
client
.get
(
"http://localhost:8082/logout"
)
.header
(
newCookie
)
.send
()
.unwrap
();
.header
(
newCookie
.clone
()
)
.send
()
.unwrap
();
newResp
=
client
.get
(
"http://localhost:8082"
)
.header
(
newCookie
2
)
.send
()
.unwrap
();
.header
(
newCookie
)
.send
()
.unwrap
();
let
mut
newContent
=
String
::
new
();
newResp
.read_to_string
(
&
mut
newContent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment