muck-friends 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. data/Rakefile +0 -1
  2. data/VERSION +1 -1
  3. data/app/controllers/muck/friends_controller.rb +65 -45
  4. data/app/helpers/muck_friends_helper.rb +2 -2
  5. data/app/models/friend_mailer.rb +1 -0
  6. data/app/views/friends/_friend_icon.html.erb +1 -1
  7. data/app/views/friends/_friend_tiny_icon.html.erb +1 -0
  8. data/lib/active_record/acts/muck_friend.rb +24 -14
  9. data/lib/active_record/acts/muck_friend_user.rb +4 -5
  10. data/lib/muck_friends.rb +2 -2
  11. data/locales/ar.yml +17 -9
  12. data/locales/bg.yml +18 -10
  13. data/locales/ca.yml +17 -9
  14. data/locales/cs.yml +17 -9
  15. data/locales/da.yml +17 -9
  16. data/locales/de.yml +17 -9
  17. data/locales/el.yml +17 -9
  18. data/locales/en.yml +2 -2
  19. data/locales/es.yml +17 -9
  20. data/locales/et.yml +17 -9
  21. data/locales/fa.yml +17 -9
  22. data/locales/fi.yml +17 -9
  23. data/locales/fr.yml +17 -9
  24. data/locales/gl.yml +18 -10
  25. data/locales/hi.yml +17 -9
  26. data/locales/hr.yml +17 -9
  27. data/locales/hu.yml +17 -9
  28. data/locales/id.yml +17 -9
  29. data/locales/it.yml +17 -9
  30. data/locales/iw.yml +17 -9
  31. data/locales/ja.yml +17 -9
  32. data/locales/ko.yml +17 -9
  33. data/locales/lt.yml +17 -9
  34. data/locales/lv.yml +17 -9
  35. data/locales/mt.yml +17 -9
  36. data/locales/nl.yml +17 -9
  37. data/locales/no.yml +17 -9
  38. data/locales/pl.yml +17 -9
  39. data/locales/pt-PT.yml +17 -9
  40. data/locales/ro.yml +17 -9
  41. data/locales/ru.yml +17 -9
  42. data/locales/sk.yml +17 -9
  43. data/locales/sl.yml +17 -9
  44. data/locales/sq.yml +17 -9
  45. data/locales/sr.yml +17 -9
  46. data/locales/sv.yml +17 -9
  47. data/locales/th.yml +17 -9
  48. data/locales/tl.yml +17 -9
  49. data/locales/tr.yml +18 -10
  50. data/locales/uk.yml +17 -9
  51. data/locales/vi.yml +17 -9
  52. data/locales/zh-CN.yml +17 -9
  53. data/locales/zh-TW.yml +17 -9
  54. data/locales/zh.yml +17 -9
  55. data/muck-friends.gemspec +3 -2
  56. data/test/rails_root/test/functional/default_controller_test.rb +3 -3
  57. data/test/rails_root/test/unit/friend_test.rb +118 -125
  58. data/test/rails_root/test/unit/user_test.rb +3 -3
  59. metadata +3 -2
data/locales/zh-CN.yml CHANGED
@@ -5,32 +5,40 @@ zh-CN:
5
5
  follow: 追随者
6
6
  friends_with: 朋友们
7
7
  friends:
8
- acccept_friend_request: 接受好友请求
8
+ acccept_friend_request: "接受好友请求{{user}}"
9
9
  accept: (接受)
10
10
  delete: (删除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
12
  followers: 追随者
13
13
  following: 下列的
14
14
  following_you: "{{name}} is now following you on {{application_name}}"
15
- friend_request: 朋友的要求
15
+ friend_request: "{{name}} has sent you a friend request on {{application_name}}"
16
16
  friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
17
17
  friend_request_pending: "朋友的要求待{{link}}"
18
+ friend_request_prompt: "发送{{user}}朋友的要求"
18
19
  friend_request_sent: 朋友要求传送
19
20
  friends: 朋友们
20
21
  friends_title: 我的朋友
21
22
  friends_with: "{{inviter}} is now friends with {{invited}}"
22
23
  ignore: (忽略)
24
+ login: 注册
25
+ login_or_sign_up_to_follow: "{{login}} or {{signup}}遵循此用户"
26
+ login_or_sign_up_to_friend: "{{login}} or {{signup}}发送交友请求"
23
27
  mutual_friends: 共同的朋友
24
- no_followers: 您目前还没有任何的追随者
28
+ no_followers: 没有追随者
25
29
  no_friends: 您目前还没有任何朋友
26
- not_following_anyone: 您目前没有任何人后
30
+ no_mutual_friends: 没有共同的朋友发现
31
+ not_following_anyone: 不遵守任何人
27
32
  problem_adding_follow: "有问题还{{user}}到您的后续名单。请再试一次。"
28
33
  problem_sending_friend_request: "有问题的朋友发送请求{{user}}.请再试一次。"
29
- removed_friendship: 删除朋友关系
34
+ removed_following_error: "出现了问题,而试图unfollow {{user}}"
35
+ removed_friendship: "删除{{user}}从您的朋友"
36
+ removed_friendship_error: "有一个问题,消除{{user}}从您的列表中的朋友"
30
37
  same_inviter_error_message: "用户不能成为朋友themself 。"
31
- sign_up_to_follow: 注册后续
32
- start_following: 启动后
33
- stop_being_friends: 不再是朋友
34
- stop_following: 停止后
38
+ signup: 注册
39
+ start_following: "后续{{user}}"
40
+ stop_being_friends_with: "Unfriend {{user}}"
41
+ stop_following: "不要再跟着{{user}}"
42
+ stopped_following: "成功地阻止以下{{user}}"
35
43
  view_all: 查看全部
36
44
  you_are_now_following: "您现在以下{{user}}"
data/locales/zh-TW.yml CHANGED
@@ -5,32 +5,40 @@ zh-TW:
5
5
  follow: 追隨者
6
6
  friends_with: 朋友們
7
7
  friends:
8
- acccept_friend_request: 接受好友請求
8
+ acccept_friend_request: "接受好友請求{{user}}"
9
9
  accept: (接受)
10
10
  delete: (刪除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
12
  followers: 追隨者
13
13
  following: 下列的
14
14
  following_you: "{{name}} is now following you on {{application_name}}"
15
- friend_request: 朋友的要求
15
+ friend_request: "{{name}} has sent you a friend request on {{application_name}}"
16
16
  friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
17
17
  friend_request_pending: "朋友的要求待{{link}}"
18
+ friend_request_prompt: "發送{{user}}朋友的要求"
18
19
  friend_request_sent: 朋友要求傳送
19
20
  friends: 朋友們
20
21
  friends_title: 我的朋友
21
22
  friends_with: "{{inviter}} is now friends with {{invited}}"
22
23
  ignore: (忽略)
24
+ login: 註冊
25
+ login_or_sign_up_to_follow: "{{login}} or {{signup}}遵循此用戶"
26
+ login_or_sign_up_to_friend: "{{login}} or {{signup}}發送交友請求"
23
27
  mutual_friends: 共同的朋友
24
- no_followers: 您目前還沒有任何的追隨者
28
+ no_followers: 沒有追隨者
25
29
  no_friends: 您目前還沒有任何朋友
26
- not_following_anyone: 您目前沒有任何人後
30
+ no_mutual_friends: 沒有共同的朋友發現
31
+ not_following_anyone: 不遵守任何人
27
32
  problem_adding_follow: "有問題還{{user}}到您的後續名單。請再試一次。"
28
33
  problem_sending_friend_request: "有問題的朋友發送請求{{user}}.請再試一次。"
29
- removed_friendship: 刪除朋友關係
34
+ removed_following_error: "出現了問題,而試圖unfollow {{user}}"
35
+ removed_friendship: "刪除{{user}}從您的朋友"
36
+ removed_friendship_error: "有一個問題,消除{{user}}從您的列表中的朋友"
30
37
  same_inviter_error_message: "用戶不能成為朋友themself 。"
31
- sign_up_to_follow: 註冊後續
32
- start_following: 啟動後
33
- stop_being_friends: 不再是朋友
34
- stop_following: 停止後
38
+ signup: 註冊
39
+ start_following: "後續{{user}}"
40
+ stop_being_friends_with: "Unfriend {{user}}"
41
+ stop_following: "不要再跟著{{user}}"
42
+ stopped_following: "成功地阻止以下{{user}}"
35
43
  view_all: 查看全部
36
44
  you_are_now_following: "您現在以下{{user}}"
data/locales/zh.yml CHANGED
@@ -5,32 +5,40 @@ zh:
5
5
  follow: 追随者
6
6
  friends_with: 朋友们
7
7
  friends:
8
- acccept_friend_request: 接受好友请求
8
+ acccept_friend_request: "接受好友请求{{user}}"
9
9
  accept: (接受)
10
10
  delete: (删除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
12
  followers: 追随者
13
13
  following: 下列的
14
14
  following_you: "{{name}} is now following you on {{application_name}}"
15
- friend_request: 朋友的要求
15
+ friend_request: "{{name}} has sent you a friend request on {{application_name}}"
16
16
  friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
17
17
  friend_request_pending: "朋友的要求待{{link}}"
18
+ friend_request_prompt: "发送{{user}}朋友的要求"
18
19
  friend_request_sent: 朋友要求传送
19
20
  friends: 朋友们
20
21
  friends_title: 我的朋友
21
22
  friends_with: "{{inviter}} is now friends with {{invited}}"
22
23
  ignore: (忽略)
24
+ login: 注册
25
+ login_or_sign_up_to_follow: "{{login}} or {{signup}}遵循此用户"
26
+ login_or_sign_up_to_friend: "{{login}} or {{signup}}发送交友请求"
23
27
  mutual_friends: 共同的朋友
24
- no_followers: 您目前还没有任何的追随者
28
+ no_followers: 没有追随者
25
29
  no_friends: 您目前还没有任何朋友
26
- not_following_anyone: 您目前没有任何人后
30
+ no_mutual_friends: 没有共同的朋友发现
31
+ not_following_anyone: 不遵守任何人
27
32
  problem_adding_follow: "有问题还{{user}}到您的后续名单。请再试一次。"
28
33
  problem_sending_friend_request: "有问题的朋友发送请求{{user}}.请再试一次。"
29
- removed_friendship: 删除朋友关系
34
+ removed_following_error: "出现了问题,而试图unfollow {{user}}"
35
+ removed_friendship: "删除{{user}}从您的朋友"
36
+ removed_friendship_error: "有一个问题,消除{{user}}从您的列表中的朋友"
30
37
  same_inviter_error_message: "用户不能成为朋友themself 。"
31
- sign_up_to_follow: 注册后续
32
- start_following: 启动后
33
- stop_being_friends: 不再是朋友
34
- stop_following: 停止后
38
+ signup: 注册
39
+ start_following: "后续{{user}}"
40
+ stop_being_friends_with: "Unfriend {{user}}"
41
+ stop_following: "不要再跟着{{user}}"
42
+ stopped_following: "成功地阻止以下{{user}}"
35
43
  view_all: 查看全部
36
44
  you_are_now_following: "您现在以下{{user}}"
data/muck-friends.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-friends}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball"]
12
- s.date = %q{2009-08-12}
12
+ s.date = %q{2009-08-13}
13
13
  s.description = %q{Friend engine for the muck system.}
14
14
  s.email = %q{justinball@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
34
34
  "app/views/friends/_friend_icon.html.erb",
35
35
  "app/views/friends/_friend_requests.html.erb",
36
36
  "app/views/friends/_friend_simple.html.erb",
37
+ "app/views/friends/_friend_tiny_icon.html.erb",
37
38
  "app/views/friends/_mutual_friends.html.erb",
38
39
  "app/views/friends/index.html.erb",
39
40
  "config/muck_friends_routes.rb",
@@ -68,7 +68,7 @@ class Muck::DefaultControllerTest < ActionController::TestCase
68
68
  should_respond_with :success
69
69
  should_render_template :friend_link
70
70
  should "have login/signup in the body" do
71
- assert @response.body.include?(I18n.t("muck.friends.muck.friends.login_or_sign_up_to_follow"), :login => link_to(I18n.t('muck.friends.login'), login_path), :signup => link_to(I18n.t('muck.friends.signup'), signup_path))
71
+ assert @response.body.include?(I18n.t('muck.friends.login'))
72
72
  end
73
73
  end
74
74
  context "current user is not friends with other user" do
@@ -120,7 +120,7 @@ class Muck::DefaultControllerTest < ActionController::TestCase
120
120
  should_respond_with :success
121
121
  should_render_template :friend_link
122
122
  should "have login/signup in the body" do
123
- assert @response.body.include?(I18n.t("muck.friends.muck.friends.login_or_sign_up_to_follow"), :login => link_to(I18n.t('muck.friends.login'), login_path), :signup => link_to(I18n.t('muck.friends.signup'), signup_path))
123
+ assert @response.body.include?(I18n.t('muck.friends.login'))
124
124
  end
125
125
  end
126
126
  context "current user is not following other user" do
@@ -174,7 +174,7 @@ class Muck::DefaultControllerTest < ActionController::TestCase
174
174
  should_respond_with :success
175
175
  should_render_template :friend_link
176
176
  should "have login/signup in the body" do
177
- assert @response.body.include?(I18n.t("muck.friends.muck.friends.login_or_sign_up_to_friend"), :login => link_to(I18n.t('muck.friends.login'), login_path), :signup => link_to(I18n.t('muck.friends.signup'), signup_path))
177
+ assert @response.body.include?(I18n.t('muck.friends.login'))
178
178
  end
179
179
  end
180
180
  context "current user is not friends with the other user" do
@@ -16,146 +16,139 @@ class FriendTest < ActiveSupport::TestCase
16
16
  @follower_guy = Factory(:user)
17
17
  end
18
18
 
19
- should "be able to start and stop following aaron" do
20
- Friend.destroy_all
21
- assert !@friend_guy.following?(@aaron)
22
- assert_difference "Friend.count" do
23
- Friend.add_follower(@friend_guy, @aaron)
24
- @aaron.reload
25
- @friend_guy.reload
26
- assert @friend_guy.following?(@aaron)
19
+ context "No entries in friends" do
20
+ setup do
21
+ Friend.destroy_all
27
22
  end
28
- assert_difference "Friend.count", -1 do
29
- Friend.stop_following(@friend_guy, @aaron)
30
- @aaron.reload and @friend_guy.reload
23
+ should "be able to start and stop following aaron" do
31
24
  assert !@friend_guy.following?(@aaron)
25
+ assert_difference "Friend.count" do
26
+ Friend.add_follower(@friend_guy, @aaron)
27
+ @aaron.reload
28
+ @friend_guy.reload
29
+ assert @friend_guy.following?(@aaron)
30
+ end
31
+ assert_difference "Friend.count", -1 do
32
+ Friend.stop_following(@friend_guy, @aaron)
33
+ @aaron.reload and @friend_guy.reload
34
+ assert !@friend_guy.following?(@aaron)
35
+ end
32
36
  end
33
- end
34
37
 
35
- should "not have any effect on friends" do
36
- Friend.destroy_all
37
- assert_no_difference "Friend.count" do
38
- assert !Friend.stop_following(@friend_guy, @aaron)
39
- end
40
- assert_no_difference "Friend.count" do
41
- assert !Friend.stop_being_friends(@friend_guy, @aaron)
38
+ should "not have any effect on friends" do
39
+ assert_no_difference "Friend.count" do
40
+ assert !Friend.stop_following(@friend_guy, @aaron)
41
+ end
42
+ assert_no_difference "Friend.count" do
43
+ assert Friend.stop_being_friends(@friend_guy, @aaron) # will return true as long as no friend entries are found for the given users
44
+ end
42
45
  end
43
- end
44
46
 
45
- should "not create an association with the same user" do
46
- Friend.destroy_all
47
- assert !Friend.add_follower(@quentin, @quentin)
48
- assert_equal 0, Friend.count
49
- end
47
+ should "not create an association with the same user" do
48
+ assert !Friend.add_follower(@quentin, @quentin)
49
+ assert_equal 0, Friend.count
50
+ end
50
51
 
51
- should "create a new follower" do
52
- Friend.destroy_all
53
- assert Friend.add_follower(@quentin, @aaron)
54
- assert_equal 1, Friend.count
55
- assert !@quentin.reload.friend_of?(@aaron.reload)
56
- assert @quentin.following?(@aaron)
57
- assert @aaron.followed_by?(@quentin)
58
- end
52
+ should "create a new follower" do
53
+ assert Friend.add_follower(@quentin, @aaron)
54
+ assert_equal 1, Friend.count
55
+ assert !@quentin.reload.friend_of?(@aaron.reload)
56
+ assert @quentin.following?(@aaron)
57
+ assert @aaron.followed_by?(@quentin)
58
+ end
59
59
 
60
- should "not find a following to turn into a friendship so just makes a follower" do
61
- Friend.destroy_all
62
- assert Friend.make_friends(@quentin, @aaron)
63
- assert_equal 1, Friend.count
64
- assert !@quentin.reload.friend_of?(@aaron.reload)
65
- assert @quentin.following?(@aaron)
66
- assert @aaron.followed_by?(@quentin)
67
- end
60
+ should "not find a following to turn into a friendship so just makes a follower" do
61
+ assert Friend.make_friends(@quentin, @aaron)
62
+ assert_equal 1, Friend.count
63
+ assert !@quentin.reload.friend_of?(@aaron.reload)
64
+ assert @quentin.following?(@aaron)
65
+ assert @aaron.followed_by?(@quentin)
66
+ end
68
67
 
69
- should "turn a following into a friendship" do
70
- Friend.destroy_all
71
- assert Friend.add_follower(@quentin, @aaron)
72
- assert_equal 1, Friend.count
73
- assert Friend.make_friends(@aaron, @quentin)
74
- assert_equal 2, Friend.count
75
- @quentin.reload
76
- @aaron.reload
77
- assert @quentin.friend_of?(@aaron)
78
- assert @aaron.friend_of?(@quentin)
79
- end
68
+ should "turn a following into a friendship" do
69
+ assert Friend.add_follower(@quentin, @aaron)
70
+ assert_equal 1, Friend.count
71
+ assert Friend.make_friends(@aaron, @quentin)
72
+ assert_equal 2, Friend.count
73
+ @quentin.reload
74
+ @aaron.reload
75
+ assert @quentin.friend_of?(@aaron)
76
+ assert @aaron.friend_of?(@quentin)
77
+ end
80
78
 
81
- should "turn a following into a friendship with reversed users" do
82
- Friend.destroy_all
83
- assert Friend.add_follower(@quentin, @aaron)
84
- assert_equal 1, Friend.count
85
- assert Friend.make_friends(@quentin, @aaron)
86
- assert_equal 2, Friend.count
87
- @quentin.reload
88
- @aaron.reload
89
- assert @quentin.friend_of?(@aaron)
90
- assert @aaron.friend_of?(@quentin)
91
- end
79
+ should "turn a following into a friendship with reversed users" do
80
+ assert Friend.add_follower(@quentin, @aaron)
81
+ assert_equal 1, Friend.count
82
+ assert Friend.make_friends(@quentin, @aaron)
83
+ assert_equal 2, Friend.count
84
+ @quentin.reload
85
+ @aaron.reload
86
+ assert @quentin.friend_of?(@aaron)
87
+ assert @aaron.friend_of?(@quentin)
88
+ end
92
89
 
93
- should "not find a friendship so can't stop being friends" do
94
- Friend.destroy_all
95
- assert !Friend.revert_to_follower(@quentin, @aaron)
96
- end
90
+ should "not find a friendship so can't stop being friends" do
91
+ assert !Friend.revert_to_follower(@quentin, @aaron) # revert_to_follower will return true as long as the desired state (reverted to follower) is achieved.
92
+ end
97
93
 
98
- should "revert to follower" do
99
- Friend.destroy_all
100
- assert Friend.add_follower(@quentin, @aaron)
101
- assert Friend.make_friends(@quentin, @aaron)
102
- assert_equal 2, Friend.count
103
- @quentin.reload
104
- @aaron.reload
105
- assert Friend.revert_to_follower(@quentin, @aaron)
106
- assert_equal 1, Friend.count
107
- @quentin.reload
108
- @aaron.reload
109
- assert !@quentin.friend_of?(@aaron)
110
- assert !@quentin.following?(@aaron)
111
- assert @quentin.followed_by?(@aaron)
112
- assert !@aaron.friend_of?(@quentin)
113
- assert @aaron.following?(@quentin)
114
- assert !@aaron.followed_by?(@quentin)
115
- end
94
+ should "revert to follower" do
95
+ assert Friend.add_follower(@quentin, @aaron)
96
+ assert Friend.make_friends(@quentin, @aaron)
97
+ assert_equal 2, Friend.count
98
+ @quentin.reload
99
+ @aaron.reload
100
+ assert Friend.revert_to_follower(@quentin, @aaron)
101
+ assert_equal 1, Friend.count
102
+ @quentin.reload
103
+ @aaron.reload
104
+ assert !@quentin.friend_of?(@aaron)
105
+ assert !@quentin.following?(@aaron)
106
+ assert @quentin.followed_by?(@aaron)
107
+ assert !@aaron.friend_of?(@quentin)
108
+ assert @aaron.following?(@quentin)
109
+ assert !@aaron.followed_by?(@quentin)
110
+ end
116
111
 
117
- should "stop being friends" do
118
- Friend.destroy_all
119
- assert Friend.add_follower(@quentin, @aaron)
120
- assert Friend.make_friends(@quentin, @aaron)
121
- assert_equal 2, Friend.count
122
- @quentin.reload
123
- @aaron.reload
124
- assert Friend.stop_being_friends(@quentin, @aaron)
125
- @quentin.reload
126
- @aaron.reload
127
- assert !@quentin.friend_of?(@aaron)
128
- assert !@quentin.following?(@aaron)
129
- assert !@quentin.followed_by?(@aaron)
130
- assert !@aaron.friend_of?(@quentin)
131
- assert !@aaron.following?(@quentin)
132
- assert !@aaron.followed_by?(@quentin)
133
- end
112
+ should "stop being friends" do
113
+ assert Friend.add_follower(@quentin, @aaron)
114
+ assert Friend.make_friends(@quentin, @aaron)
115
+ assert_equal 2, Friend.count
116
+ @quentin.reload
117
+ @aaron.reload
118
+ assert Friend.stop_being_friends(@quentin, @aaron)
119
+ @quentin.reload
120
+ @aaron.reload
121
+ assert !@quentin.friend_of?(@aaron)
122
+ assert !@quentin.following?(@aaron)
123
+ assert !@quentin.followed_by?(@aaron)
124
+ assert !@aaron.friend_of?(@quentin)
125
+ assert !@aaron.following?(@quentin)
126
+ assert !@aaron.followed_by?(@quentin)
127
+ end
134
128
 
135
- should "block friend" do
136
- Friend.destroy_all
137
- assert Friend.add_follower(@quentin, @aaron)
138
- assert Friend.make_friends(@quentin, @aaron)
139
- Friend.block_user(@quentin, @aaron)
140
- assert @quentin.blocked_users.include?(@aaron)
141
- assert !@quentin.friend_of?(@aaron)
142
- assert !@quentin.followed_by?(@aaron)
143
- assert !@quentin.following?(@aaron)
144
- assert !@aaron.friend_of?(@quentin)
145
- assert !@aaron.followed_by?(@quentin)
146
- assert !@aaron.following?(@quentin)
147
- end
129
+ should "block friend" do
130
+ assert Friend.add_follower(@quentin, @aaron)
131
+ assert Friend.make_friends(@quentin, @aaron)
132
+ Friend.block_user(@quentin, @aaron)
133
+ assert @quentin.blocked_users.include?(@aaron)
134
+ assert !@quentin.friend_of?(@aaron)
135
+ assert !@quentin.followed_by?(@aaron)
136
+ assert !@quentin.following?(@aaron)
137
+ assert !@aaron.friend_of?(@quentin)
138
+ assert !@aaron.followed_by?(@quentin)
139
+ assert !@aaron.following?(@quentin)
140
+ end
148
141
 
149
- should "block follower" do
150
- Friend.destroy_all
151
- assert Friend.add_follower(@quentin, @aaron)
152
- Friend.block_user(@aaron, @quentin)
153
- assert @aaron.blocked_users.include?(@quentin)
154
- assert !@quentin.friend_of?(@aaron)
155
- assert !@quentin.following?(@aaron)
156
- assert !@aaron.friend_of?(@quentin)
157
- assert !@aaron.following?(@quentin)
158
- assert !@aaron.followed_by?(@quentin)
142
+ should "block follower" do
143
+ assert Friend.add_follower(@quentin, @aaron)
144
+ Friend.block_user(@aaron, @quentin)
145
+ assert @aaron.blocked_users.include?(@quentin)
146
+ assert !@quentin.friend_of?(@aaron)
147
+ assert !@quentin.following?(@aaron)
148
+ assert !@aaron.friend_of?(@quentin)
149
+ assert !@aaron.following?(@quentin)
150
+ assert !@aaron.followed_by?(@quentin)
151
+ end
159
152
  end
160
153
 
161
154
  should "ignore block user request" do