0

カピバラとのレール統合テストのコードは次のとおりです。

it "should work with links on index page" do
      visit customers_path
      save_and_open_page
      click_link 'Edit'
end

表示される html ページは次のとおりです。

ここに画像の説明を入力

ページに編集リンクがあります。ただし、click_link 'Edit' は引き続きエラーをスローします。

 1) TestPaths GET /customerx_test_paths should work with links on index page
     ←[31mFailure/Error:←[0m ←[31mclick_link 'Edit'←[0m
     ←[31mCapybara::InfiniteRedirectError:←[0m
       ←[31mredirected more than 5 times, check for infinite redirects.←[0m
←[36m     # ./spec/features/customerx/customerx_test_paths_spec.rb:130:in `block (3 levels) in <top (required)>'←[0m

エディット カスタマー パスの統合テスト。しかし、テストのすべての click_link でエラーが発生します。コードのどこが間違っている可能性がありますか? ありがとう。

4

0 に答える 0