More test
This commit is contained in:
parent
62fe9e6955
commit
836a3e7ea2
1 changed files with 10 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class BrowserBrowseTest < ActionDispatch::IntegrationTest
|
class BrowserBrowseTest < ActionDispatch::IntegrationTest
|
||||||
test "user can navigate to login form and log in" do
|
test "login and check profile page" do
|
||||||
visit root_path
|
visit root_path
|
||||||
click_link 'Login'
|
click_link 'Login'
|
||||||
|
|
||||||
|
|
@ -11,18 +11,18 @@ class BrowserBrowseTest < ActionDispatch::IntegrationTest
|
||||||
click_button 'Log in'
|
click_button 'Log in'
|
||||||
end
|
end
|
||||||
|
|
||||||
# byebug
|
|
||||||
assert_equal 200, status_code
|
assert_equal 200, status_code
|
||||||
# puts page.body
|
|
||||||
assert_current_path my_welcome_path
|
assert_current_path my_welcome_path
|
||||||
page.must_have_content 'You are now logged in'
|
page.must_have_content 'You are now logged in'
|
||||||
# click_on 'profile page'
|
|
||||||
# page.must_have_content users(:normal).email
|
click_on 'profile page'
|
||||||
|
page.must_have_content users(:normal).email
|
||||||
end
|
end
|
||||||
|
|
||||||
# test "user can browse packages" do
|
test "guest can browse packages" do
|
||||||
# visit packages_grid_path
|
visit packages_grid_path
|
||||||
# page.must_have_content /Previous/
|
assert_equal 200, status_code
|
||||||
# page.must_have_link href: packages_grid_path(page: 2)
|
page.must_have_content /Previous/
|
||||||
# end
|
page.must_have_link href: packages_grid_path(page: 2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue