Skip to content

Commit

Permalink
Fix test as rails no longer seems to return a body for redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Oct 7, 2023
1 parent 94140d2 commit 7253aa0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions test/integration/user_diaries_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,7 @@ def test_showing_create_diary_entry
# We can now login
post "/login", :params => { "username" => user.email, "password" => "test", :referer => "/diary/new" }
assert_response :redirect

# Check that there is some payload alerting the user to the redirect
# and allowing them to get to the page they are being directed to
assert_select "html:root" do
assert_select "body" do
assert_select "a[href='http://www.example.com/diary/new']"
end
end
# Required due to a bug in the rails testing framework
# http://markmail.org/message/wnslvi5xv5moqg7g
@html_document = nil
follow_redirect!

assert_response :success
assert_template "diary_entries/new"

Expand Down

0 comments on commit 7253aa0

Please sign in to comment.