From 606ef8eb43c760557326d119c4e51ea260e0f36d Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 2 Jan 2009 17:23:18 -0300 Subject: [PATCH] ActionItem618: fixing tests --- test/functional/mailconf_controller_test.rb | 1 + test/functional/my_profile_controller_test.rb | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) 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