Commit 606ef8eb43c760557326d119c4e51ea260e0f36d
1 parent
a4675300
Exists in
staging
and in
42 other branches
ActionItem618: fixing tests
Showing
2 changed files
with
4 additions
and
0 deletions
Show diff stats
test/functional/mailconf_controller_test.rb
... | ... | @@ -24,6 +24,7 @@ class MailconfControllerTest < Test::Unit::TestCase |
24 | 24 | |
25 | 25 | should 'not be used by organizations' do |
26 | 26 | org = Organization.create!(:name => 'testorg', :identifier => 'testorg') |
27 | + login_as('ze') | |
27 | 28 | get :index, :profile => 'testorg' |
28 | 29 | assert_response 403 |
29 | 30 | end | ... | ... |
test/functional/my_profile_controller_test.rb
... | ... | @@ -34,6 +34,7 @@ class MyProfileControllerTest < Test::Unit::TestCase |
34 | 34 | def test_should_allow_person |
35 | 35 | @controller = OnlyForPersonTestController.new |
36 | 36 | person = create_user('random_joe') |
37 | + login_as('random_joe') | |
37 | 38 | |
38 | 39 | get :index, :profile => 'random_joe' |
39 | 40 | assert_response :success |
... | ... | @@ -42,6 +43,8 @@ class MyProfileControllerTest < Test::Unit::TestCase |
42 | 43 | def test_should_not_allow_bare_profile |
43 | 44 | @controller = OnlyForPersonTestController.new |
44 | 45 | org = Organization.create!(:identifier => 'hacking_institute', :name => 'Hacking Institute') |
46 | + create_user('random_joe') | |
47 | + login_as('random_joe') | |
45 | 48 | |
46 | 49 | get :index, :profile => 'hacking_institute' |
47 | 50 | assert_response 403 # forbidden | ... | ... |