mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-25 20:12:14 +03:00
609868c858
predicate countEquals becomes deprecated and is replaced by count ==
60 lines
7.7 KiB
HTML
60 lines
7.7 KiB
HTML
<!DOCTYPE html>
|
|
<html><head><title>Hurl File</title><style>
|
|
body {
|
|
counter-reset: line;
|
|
font-family: monospace;
|
|
}
|
|
|
|
span.line {
|
|
display: block;
|
|
line-height: 1.2rem;
|
|
}
|
|
|
|
span.line:before {
|
|
counter-increment: line;
|
|
content: counter(line);
|
|
display: inline-block;
|
|
border-right: 1px solid #ddd;
|
|
padding: 0 1em;
|
|
margin-right: .5em;
|
|
color: #888;
|
|
width: 2.5em;
|
|
text-align: right;
|
|
}
|
|
|
|
.method {
|
|
color: black;
|
|
}
|
|
|
|
.url {
|
|
color: darkblue;
|
|
}
|
|
|
|
.version {
|
|
color: black;
|
|
}
|
|
.status {
|
|
color: blue;
|
|
}
|
|
.section-header {
|
|
color: darkmagenta;
|
|
}
|
|
|
|
.query-type {
|
|
color: teal;
|
|
}
|
|
|
|
.predicate-type {
|
|
color: darkblue;
|
|
}
|
|
|
|
.string {
|
|
color: darkgreen;
|
|
}
|
|
|
|
.comment {
|
|
color: dimgray;
|
|
}
|
|
</style></head><body>
|
|
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="comment"># Request Cookie</span></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-request-cookie1-valueA</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">cookie1<span>:</span> valueA</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="comment"># The cookie is not added in the cookie storage</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-multiple-request-cookies</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">user1<span>:</span> Bob</span><span class="line">user2<span>:</span> Bill</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="comment"># Session Cookie</span></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-session-cookie2-valueA</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2"</span> <span class="predicate-type">equals</span> <span class="string">"valueA"</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-valueA</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">cookie2<span>:</span> valueB</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/delete-cookie2</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2"</span> <span class="predicate-type">equals</span> <span class="string">""</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2[Max-Age]"</span> <span class="predicate-type">equals</span> <span class="number">0</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts</span></span><span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/</span></span><span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/</span></span><span class="line"></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="query-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID"</span> <span class="predicate-type">equals</span> <span class="string">"DQAAAKEaem_vYg"</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Value]"</span> <span class="predicate-type">equals</span> <span class="string">"DQAAAKEaem_vYg"</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Expires]"</span> <span class="predicate-type">exists</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Expires]"</span> <span class="predicate-type">equals</span> <span class="string">"Wed, 13 Jan 2021 22:23:01 GMT"</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Max-Age]"</span> not <span class="predicate-type">exists</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Domain]"</span> not <span class="predicate-type">exists</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Path]"</span> <span class="predicate-type">equals</span> <span class="string">"/accounts"</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Secure]"</span> <span class="predicate-type">exists</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[HttpOnly]"</span> <span class="predicate-type">exists</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[SameSite]"</span> not <span class="predicate-type">exists</span></span></div></div><span class="line"></span><span class="line"></span></div>
|
|
</body></html> |