Commit 606ef8eb43c760557326d119c4e51ea260e0f36d

Authored by Antonio Terceiro
1 parent a4675300

ActionItem618: fixing tests

test/functional/mailconf_controller_test.rb
@@ -24,6 +24,7 @@ class MailconfControllerTest < Test::Unit::TestCase @@ -24,6 +24,7 @@ class MailconfControllerTest < Test::Unit::TestCase
24 24
25 should 'not be used by organizations' do 25 should 'not be used by organizations' do
26 org = Organization.create!(:name => 'testorg', :identifier => 'testorg') 26 org = Organization.create!(:name => 'testorg', :identifier => 'testorg')
  27 + login_as('ze')
27 get :index, :profile => 'testorg' 28 get :index, :profile => 'testorg'
28 assert_response 403 29 assert_response 403
29 end 30 end
test/functional/my_profile_controller_test.rb
@@ -34,6 +34,7 @@ class MyProfileControllerTest < Test::Unit::TestCase @@ -34,6 +34,7 @@ class MyProfileControllerTest < Test::Unit::TestCase
34 def test_should_allow_person 34 def test_should_allow_person
35 @controller = OnlyForPersonTestController.new 35 @controller = OnlyForPersonTestController.new
36 person = create_user('random_joe') 36 person = create_user('random_joe')
  37 + login_as('random_joe')
37 38
38 get :index, :profile => 'random_joe' 39 get :index, :profile => 'random_joe'
39 assert_response :success 40 assert_response :success
@@ -42,6 +43,8 @@ class MyProfileControllerTest < Test::Unit::TestCase @@ -42,6 +43,8 @@ class MyProfileControllerTest < Test::Unit::TestCase
42 def test_should_not_allow_bare_profile 43 def test_should_not_allow_bare_profile
43 @controller = OnlyForPersonTestController.new 44 @controller = OnlyForPersonTestController.new
44 org = Organization.create!(:identifier => 'hacking_institute', :name => 'Hacking Institute') 45 org = Organization.create!(:identifier => 'hacking_institute', :name => 'Hacking Institute')
  46 + create_user('random_joe')
  47 + login_as('random_joe')
45 48
46 get :index, :profile => 'hacking_institute' 49 get :index, :profile => 'hacking_institute'
47 assert_response 403 # forbidden 50 assert_response 403 # forbidden