Commit 706a1c39f42767bd4543e758eae609509b337236
1 parent
dc758973
Exists in
staging
and in
42 other branches
ActionItem36: listing friends in /profile/${user}
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1489 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
15 additions
and
3 deletions
Show diff stats
app/controllers/public/profile_controller.rb
test/functional/profile_controller_test.rb
| ... | ... | @@ -9,10 +9,18 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 9 | 9 | @controller = ProfileController.new |
| 10 | 10 | @request = ActionController::TestRequest.new |
| 11 | 11 | @response = ActionController::TestResponse.new |
| 12 | + | |
| 13 | + @profile = create_user('testuser').person | |
| 12 | 14 | end |
| 13 | 15 | |
| 14 | - # Replace this with your real tests. | |
| 15 | - def test_truth | |
| 16 | - assert true | |
| 16 | + noosfero_test :profile => 'testuser' | |
| 17 | + | |
| 18 | + should 'list friends' do | |
| 19 | + get :friends | |
| 20 | + | |
| 21 | + assert_response :success | |
| 22 | + assert_template 'friends' | |
| 23 | + assert_kind_of Array, assigns(:friends) | |
| 17 | 24 | end |
| 25 | + | |
| 18 | 26 | end | ... | ... |