diff --git a/test/functional/mailconf_controller_test.rb b/test/functional/mailconf_controller_test.rb index 2846ad6..ecf82bc 100644 --- a/test/functional/mailconf_controller_test.rb +++ b/test/functional/mailconf_controller_test.rb @@ -24,6 +24,7 @@ class MailconfControllerTest < Test::Unit::TestCase should 'not be used by organizations' do org = Organization.create!(:name => 'testorg', :identifier => 'testorg') + login_as('ze') get :index, :profile => 'testorg' assert_response 403 end diff --git a/test/functional/my_profile_controller_test.rb b/test/functional/my_profile_controller_test.rb index efccbb2..45ef1c2 100644 --- a/test/functional/my_profile_controller_test.rb +++ b/test/functional/my_profile_controller_test.rb @@ -34,6 +34,7 @@ class MyProfileControllerTest < Test::Unit::TestCase def test_should_allow_person @controller = OnlyForPersonTestController.new person = create_user('random_joe') + login_as('random_joe') get :index, :profile => 'random_joe' assert_response :success @@ -42,6 +43,8 @@ class MyProfileControllerTest < Test::Unit::TestCase def test_should_not_allow_bare_profile @controller = OnlyForPersonTestController.new org = Organization.create!(:identifier => 'hacking_institute', :name => 'Hacking Institute') + create_user('random_joe') + login_as('random_joe') get :index, :profile => 'hacking_institute' assert_response 403 # forbidden -- libgit2 0.21.2