Skip to content

Commit

Permalink
Fix request tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandervanzuriak committed Dec 17, 2024
1 parent 1296e1c commit 92c0044
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions spec/requests/calculators_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@
end

describe "POST #calculate" do
before do
sign_in user
end
context "when user sign_in" do
it "returns a successful response" do
sign_in user

it "returns a successful response" do
post calculate_calculator_path(calculator.slug)
post calculate_calculator_path(calculator.slug)

expect(response).to be_successful
expect(response).to be_successful
end
end
end
end
2 changes: 1 addition & 1 deletion spec/requests/home_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

context "redirect to root_url" do
it "is successful" do
get "/"
get root_redirection_path

expect(response).to redirect_to(root_path)
end
Expand Down

0 comments on commit 92c0044

Please sign in to comment.