From 836a3e7ea281f22dc631c834517e472850bfd4e7 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 15 Aug 2018 17:42:41 +0200 Subject: [PATCH] More test --- test/functional/login_test.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/functional/login_test.rb b/test/functional/login_test.rb index 30989ed..57a259e 100644 --- a/test/functional/login_test.rb +++ b/test/functional/login_test.rb @@ -1,7 +1,7 @@ require 'test_helper' 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 click_link 'Login' @@ -11,18 +11,18 @@ class BrowserBrowseTest < ActionDispatch::IntegrationTest click_button 'Log in' end - # byebug assert_equal 200, status_code - # puts page.body 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 + + click_on 'profile page' + page.must_have_content users(:normal).email end - # test "user can browse packages" do - # visit packages_grid_path - # page.must_have_content /Previous/ - # page.must_have_link href: packages_grid_path(page: 2) - # 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