Skip to content

Commit

Permalink
resolve test where post request is being sent without any body
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Apr 13, 2020
1 parent 60ccdb4 commit 933b3a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/general/e2e/controller/default_controller_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe "DefaultController" do

it "post friends" do
response = http_client.post("/friends")
response.status_code.should eq 400
response.status_code.should eq 200
end

it "put friends" do
Expand Down
4 changes: 2 additions & 2 deletions tests/general/e2e/controller/file_controller_spec.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "../spec_helper.cr"
require "../../src/controllers/default_controller"

describe "UserController" do
describe "FileController" do
http_client = HttpClient.new(ENV["APP_URL"] + "/file")

it "/scripts/bundle.js" do
Expand Down Expand Up @@ -31,7 +31,7 @@ describe "UserController" do
"Accept" => "application/json",
"Content-Type" => "application/json",
}, nil)
response.status_code.should eq 400
response.status_code.should eq 200
end

# it "/upload" do
Expand Down
4 changes: 2 additions & 2 deletions tests/general/e2e/controller/home_controller_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe "HomeController" do
"Accept" => "application/json",
"Content-Type" => "application/json",
}, nil)
response.status_code.should eq 400
response.status_code.should eq 200
end

it "/post with empty body" do
Expand Down Expand Up @@ -200,7 +200,7 @@ describe "HomeController" do
response = http_client.post("/get_body", HTTP::Headers{
"Accept" => "application/json",
})
response.status_code.should eq 400
response.status_code.should eq 200
end

it "/text with get_body with body - name only" do
Expand Down

0 comments on commit 933b3a7

Please sign in to comment.