Skip to content

Commit 933b3a7

Browse files
resolve test where post request is being sent without any body
1 parent 60ccdb4 commit 933b3a7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/general/e2e/controller/default_controller_spec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe "DefaultController" do
4040

4141
it "post friends" do
4242
response = http_client.post("/friends")
43-
response.status_code.should eq 400
43+
response.status_code.should eq 200
4444
end
4545

4646
it "put friends" do

tests/general/e2e/controller/file_controller_spec.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "../spec_helper.cr"
22
require "../../src/controllers/default_controller"
33

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

77
it "/scripts/bundle.js" do
@@ -31,7 +31,7 @@ describe "UserController" do
3131
"Accept" => "application/json",
3232
"Content-Type" => "application/json",
3333
}, nil)
34-
response.status_code.should eq 400
34+
response.status_code.should eq 200
3535
end
3636

3737
# it "/upload" do

tests/general/e2e/controller/home_controller_spec.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe "HomeController" do
100100
"Accept" => "application/json",
101101
"Content-Type" => "application/json",
102102
}, nil)
103-
response.status_code.should eq 400
103+
response.status_code.should eq 200
104104
end
105105

106106
it "/post with empty body" do
@@ -200,7 +200,7 @@ describe "HomeController" do
200200
response = http_client.post("/get_body", HTTP::Headers{
201201
"Accept" => "application/json",
202202
})
203-
response.status_code.should eq 400
203+
response.status_code.should eq 200
204204
end
205205

206206
it "/text with get_body with body - name only" do

0 commit comments

Comments
 (0)