Commit ba87743f7d035ac30a70ec6e35e0abecbd19cefe
1 parent
3d48702e
Exists in
master
and in
22 other branches
ActionItem36: describing new friend requests
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1509 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
16 additions
and
0 deletions
Show diff stats
app/models/add_friend.rb
test/unit/add_friend_test.rb
| ... | ... | @@ -70,4 +70,16 @@ class AddFriendTest < ActiveSupport::TestCase |
| 70 | 70 | |
| 71 | 71 | end |
| 72 | 72 | |
| 73 | + should 'provide proper description' do | |
| 74 | + p1 = create_user('testuser1').person | |
| 75 | + p2 = create_user('testuser2').person | |
| 76 | + | |
| 77 | + TaskMailer.expects(:deliver_task_finished).never | |
| 78 | + TaskMailer.expects(:deliver_task_created).never | |
| 79 | + | |
| 80 | + task = AddFriend.create!(:person => p1, :friend => p2) | |
| 81 | + | |
| 82 | + assert_equal 'testuser1 wants to be your friend', task.description | |
| 83 | + end | |
| 84 | + | |
| 73 | 85 | end | ... | ... |