Migrating tests to system tests
This commit is contained in:
parent
a68c2b8422
commit
29af244327
4 changed files with 27 additions and 117 deletions
|
|
@ -4,11 +4,37 @@ class UsersTest < ApplicationSystemTestCase
|
|||
test "go to login page" do
|
||||
visit new_user_session_path
|
||||
|
||||
fill_in 'user[email]', with: 'admin@debian.ork'
|
||||
fill_in 'user[email]', with: users(:admin).email
|
||||
fill_in 'user[password]', with: 'adminsecret'
|
||||
|
||||
click_on 'commit'
|
||||
|
||||
assert_text 'Signed in successfully'
|
||||
end
|
||||
|
||||
# TODO: these cases must be changed to the Rails System Tests syntax
|
||||
# test "login and check profile page" do
|
||||
# visit root_path
|
||||
# click_link 'Login'
|
||||
|
||||
# within 'form' do
|
||||
# fill_in 'email address', with: users(:normal).email
|
||||
# fill_in 'password', with: 'normalsecret'
|
||||
# click_button 'Log in'
|
||||
# end
|
||||
|
||||
# assert_equal 200, status_code
|
||||
# assert_current_path my_welcome_path
|
||||
# page.must_have_content 'You are now logged in'
|
||||
|
||||
# click_on 'profile page'
|
||||
# page.must_have_content users(:normal).email
|
||||
# end
|
||||
|
||||
# test "guest can browse packages" do
|
||||
# visit packages_grid_path
|
||||
# assert_equal 200, status_code
|
||||
# page.must_have_content /Previous/
|
||||
# page.must_have_link href: packages_grid_path(page: 2)
|
||||
# end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue