mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
All specs passing except macros
This commit is contained in:
parent
c6e9e7a827
commit
d1f95c0f39
17 changed files with 243 additions and 247 deletions
|
@ -8,8 +8,10 @@ describe "Kemal::Middleware::HTTPBasicAuth" do
|
|||
"/",
|
||||
headers: HTTP::Headers{"Authorization": "Basic c2VyZGFyOjEyMw=="},
|
||||
)
|
||||
response = auth_handler.call(request)
|
||||
response.status_code.should eq 404
|
||||
|
||||
io_with_context = create_request_and_return_io(auth_handler, request)
|
||||
client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false)
|
||||
client_response.status_code.should eq 404
|
||||
end
|
||||
|
||||
it "returns 401 with incorrect credentials" do
|
||||
|
@ -19,7 +21,8 @@ describe "Kemal::Middleware::HTTPBasicAuth" do
|
|||
"/",
|
||||
headers: HTTP::Headers{"Authorization": "NotBasic"},
|
||||
)
|
||||
response = auth_handler.call(request)
|
||||
response.status_code.should eq 401
|
||||
io_with_context = create_request_and_return_io(auth_handler, request)
|
||||
client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false)
|
||||
client_response.status_code.should eq 401
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue