Commit 4714fcb38760001a0025efbf6e6dc6dee30c1aad

Authored by Antonio Terceiro
1 parent 4f91b9e3

Fix InviteFriend test

Actually, replace the current test with a reasonable one.

(ActionItem1640)
Showing 1 changed file with 3 additions and 8 deletions   Show diff stats
test/unit/invite_friend_test.rb
... ... @@ -105,16 +105,11 @@ class InviteFriendTest < ActiveSupport::TestCase
105 105 task = InviteFriend.create!(:person => p1, :friend => p2)
106 106 end
107 107  
108   - should 'provide proper description' do
  108 + should 'mention inviter in description' do
109 109 p1 = create_user('testuser1').person
110   - p2 = create_user('testuser2').person
111   -
112   - TaskMailer.expects(:deliver_task_finished).never
113   - TaskMailer.expects(:deliver_task_created).never
114   -
115   - task = InviteFriend.create!(:person => p1, :friend => p2)
  110 + task = InviteFriend.new(:person => p1)
116 111  
117   - assert_equal 'testuser1 wants to be your friend.', task.description
  112 + assert_match 'testuser1', task.description
118 113 end
119 114  
120 115 should 'has permission to manage friends' do
... ...