mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Macros spec passing
This commit is contained in:
		
							parent
							
								
									d1f95c0f39
								
							
						
					
					
						commit
						4dd027eb96
					
				
					 2 changed files with 31 additions and 33 deletions
				
			
		|  | @ -1,31 +1,31 @@ | ||||||
| # require "./spec_helper" | require "./spec_helper" | ||||||
| # | 
 | ||||||
| # describe "Macros" do | describe "Macros" do | ||||||
| #   describe "#basic_auth" do |   describe "#basic_auth" do | ||||||
| #     it "adds HTTPBasicAuthHandler" do |     it "adds HTTPBasicAuthHandler" do | ||||||
| #       basic_auth "serdar", "123" |       basic_auth "serdar", "123" | ||||||
| #       Kemal.config.handlers.size.should eq 1 |       Kemal.config.handlers.size.should eq 1 | ||||||
| #     end |     end | ||||||
| #   end |   end | ||||||
| # | 
 | ||||||
| #   describe "#public_folder" do |   describe "#public_folder" do | ||||||
| #     it "sets public folder" do |     it "sets public folder" do | ||||||
| #       public_folder "/some/path/to/folder" |       public_folder "/some/path/to/folder" | ||||||
| #       Kemal.config.public_folder.should eq("/some/path/to/folder") |       Kemal.config.public_folder.should eq("/some/path/to/folder") | ||||||
| #     end |     end | ||||||
| #   end |   end | ||||||
| # | 
 | ||||||
| #   describe "#add_handler" do |   describe "#add_handler" do | ||||||
| #     it "adds a custom handler" do |     it "adds a custom handler" do | ||||||
| #       add_handler CustomTestHandler.new |       add_handler CustomTestHandler.new | ||||||
| #       Kemal.config.handlers.size.should eq 1 |       Kemal.config.handlers.size.should eq 1 | ||||||
| #     end |     end | ||||||
| #   end |   end | ||||||
| # | 
 | ||||||
| #   describe "#logging" do |   describe "#logging" do | ||||||
| #     it "sets logging status" do |     it "sets logging status" do | ||||||
| #       logging false |       logging false | ||||||
| #       Kemal.config.logging.should eq false |       Kemal.config.logging.should eq false | ||||||
| #     end |     end | ||||||
| #   end |   end | ||||||
| # end | end | ||||||
|  |  | ||||||
|  | @ -32,8 +32,6 @@ class Kemal::Handler < HTTP::Handler | ||||||
|       if route.match?(context.request) |       if route.match?(context.request) | ||||||
|         begin |         begin | ||||||
|           body = route.handler.call(context).to_s |           body = route.handler.call(context).to_s | ||||||
|           # context.response.status_code = 200 |  | ||||||
|           # context.response.content_type =  "text/html" |  | ||||||
|           context.response.print body |           context.response.print body | ||||||
|           return context |           return context | ||||||
|         rescue ex |         rescue ex | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue