require 'test_helper'
class MyTest < ActionController::IntegrationTest
test "view posts from login page" do
visit("/logins/new")
find_field('Username').set('abode')
find_field('Password').set('efghi')
click_link_or_button('Login')
assert page.has_content?('Signed in!')
end
test "go to new user page" do
visit("/logins/new")
click_link("New user?")
assert (current_path == "/users/new")
end
end
Error:
test_view_posts_from_login_page(MyTest):
ActionController::RoutingError: No route matches [POST] "/logins/new"
test/integration/view_posts_test.rb:12:in `block in <class:MyTest>'
12 行目のエラーが表示されます。「ログイン」ボタンまたは /logins/new パスに問題がありますか? 2 番目のテストはパスしますが、パスは正しいはずですか? 私は何を間違っていますか?
ありがとう!