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 current_path == "/logins/new"
assert current_path == "/posts/index"
end
end
In the code above, first assert is passing whereas the second is failing. It should happen otherwise. After click_link_or_button('Login')
is executed the page logins I am assuming. What am I doing wrong?
Thanks!