muck-friends 0.1.1 → 0.1.2

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 (72) hide show
  1. data/README.rdoc +8 -6
  2. data/Rakefile +0 -10
  3. data/VERSION +1 -1
  4. data/app/helpers/muck_friends_helper.rb +27 -22
  5. data/app/views/friends/_all_friends.html.erb +8 -0
  6. data/app/views/friends/_friend_requests.html.erb +5 -0
  7. data/app/views/friends/_friend_simple.html.erb +2 -2
  8. data/app/views/friends/_mutual_friends.html.erb +3 -0
  9. data/lib/active_record/acts/muck_friend.rb +2 -2
  10. data/locales/ar.yml +5 -0
  11. data/locales/bg.yml +6 -1
  12. data/locales/ca.yml +5 -0
  13. data/locales/cs.yml +5 -0
  14. data/locales/da.yml +5 -0
  15. data/locales/de.yml +7 -2
  16. data/locales/el.yml +5 -0
  17. data/locales/en.yml +5 -0
  18. data/locales/es.yml +5 -0
  19. data/locales/et.yml +5 -0
  20. data/locales/fa.yml +5 -0
  21. data/locales/fi.yml +5 -0
  22. data/locales/fr.yml +5 -0
  23. data/locales/gl.yml +5 -0
  24. data/locales/hi.yml +5 -0
  25. data/locales/hr.yml +5 -0
  26. data/locales/hu.yml +5 -0
  27. data/locales/id.yml +5 -0
  28. data/locales/it.yml +5 -0
  29. data/locales/iw.yml +5 -0
  30. data/locales/ja.yml +5 -0
  31. data/locales/ko.yml +5 -0
  32. data/locales/lt.yml +5 -0
  33. data/locales/lv.yml +5 -0
  34. data/locales/mt.yml +5 -0
  35. data/locales/nl.yml +5 -0
  36. data/locales/no.yml +5 -0
  37. data/locales/pl.yml +5 -0
  38. data/locales/pt-PT.yml +5 -0
  39. data/locales/ro.yml +5 -0
  40. data/locales/ru.yml +5 -0
  41. data/locales/sk.yml +5 -0
  42. data/locales/sl.yml +5 -0
  43. data/locales/sq.yml +5 -0
  44. data/locales/sr.yml +5 -0
  45. data/locales/sv.yml +5 -0
  46. data/locales/th.yml +5 -0
  47. data/locales/tl.yml +5 -0
  48. data/locales/tr.yml +5 -0
  49. data/locales/uk.yml +5 -0
  50. data/locales/vi.yml +5 -0
  51. data/locales/zh-CN.yml +5 -0
  52. data/locales/zh-TW.yml +5 -0
  53. data/locales/zh.yml +5 -0
  54. data/muck-friends.gemspec +17 -6
  55. data/test/rails_root/Rakefile +1 -0
  56. data/test/rails_root/app/controllers/default_controller.rb +4 -2
  57. data/test/rails_root/app/models/profile.rb +3 -0
  58. data/test/rails_root/app/models/user.rb +1 -0
  59. data/test/rails_root/app/views/default/{index.html.erb → all_friends.html.erb} +0 -0
  60. data/test/rails_root/app/views/default/followers.html.erb +1 -0
  61. data/test/rails_root/app/views/default/followings.html.erb +1 -0
  62. data/test/rails_root/app/views/default/friend_requests.html.erb +1 -0
  63. data/test/rails_root/app/views/default/friends.html.erb +1 -0
  64. data/test/rails_root/app/views/default/mutual_friends.html.erb +1 -0
  65. data/test/rails_root/config/environment.rb +1 -0
  66. data/test/rails_root/config/routes.rb +3 -1
  67. data/test/rails_root/db/migrate/20090512013727_create_profiles.rb +21 -0
  68. data/test/rails_root/test/functional/default_controller_test.rb +101 -0
  69. metadata +17 -6
  70. data/app/views/friends/_friends.html.erb +0 -8
  71. data/app/views/friends/_notifications.html.erb +0 -32
  72. data/app/views/friends/friend_or_follow_request.html.erb +0 -8
@@ -9,13 +9,18 @@ sv:
9
9
  accept: (acceptera)
10
10
  delete: (radera)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: Efterföljare
13
+ following: Följande
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: Vänbegäran
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "Vänbegäran väntan {{link}}"
15
18
  friend_request_sent: "Vänbegäran Skickat"
19
+ friends: Vänner
16
20
  friends_title: "Mina vänner"
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (ignorera)
23
+ mutual_friends: "Ömsesidigt Vänner"
19
24
  no_followers: "Du för närvarande inte har några anhängare"
20
25
  no_friends: "Du för närvarande inte har några vänner"
21
26
  not_following_anyone: "Du är för närvarande inte efter någon"
@@ -9,13 +9,18 @@ th:
9
9
  accept: (รับ)
10
10
  delete: (ลบ)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: สมัครพรรคพวก
13
+ following: ต่อไปนี้
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: เพื่อนคำขอ
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "เพื่อนที่รอการอนุมัติคำขอ {{link}}"
15
18
  friend_request_sent: เพื่อนส่งคำขอแล้ว
19
+ friends: เพื่อนๆ
16
20
  friends_title: เพื่อนของฉัน
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (ละเว้น)
23
+ mutual_friends: เพื่อนของทั้งสองฝ่าย
19
24
  no_followers: คุณไม่ได้ในขณะนี้มีสมัครพรรคพวก
20
25
  no_friends: คุณไม่ได้มีอยู่ในขณะนี้เพื่อนๆ
21
26
  not_following_anyone: ขณะนี้ท่านไม่ได้ต่อไปนี้ทุกคน
@@ -9,13 +9,18 @@ tl:
9
9
  accept: (tanggapin)
10
10
  delete: (tanggalin)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: Mga
13
+ following: Sumusunod
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: "Kaibigan ng Kahilingan"
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "Friend request pending {{link}}"
15
18
  friend_request_sent: "Kaibigan Naipadalang Kahilingan"
19
+ friends: "Mga kaibigan"
16
20
  friends_title: "Aking Kaibigan"
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: "(huwag pansinin)"
23
+ mutual_friends: "Mutual Kaibigan"
19
24
  no_followers: "Ikaw ay hindi kasalukuyan ay may anumang mga"
20
25
  no_friends: "Ikaw ay hindi kasalukuyan ay may anumang mga kaibigan"
21
26
  not_following_anyone: "Ikaw ay kasalukuyang hindi sumusunod na kahit sino"
@@ -9,13 +9,18 @@ tr:
9
9
  accept: "() kabul"
10
10
  delete: (sil)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: Taraftar
13
+ following: Sonraki
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: "Arkadaşına İstek"
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "Arkadaş isteğini bekleyen {{link}}"
15
18
  friend_request_sent: "Arkadaşına İstek Gönderildi"
19
+ friends: Arkadaşlar
16
20
  friends_title: Arkadaşlar
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: "() yok saymak"
23
+ mutual_friends: "Karşılıklı Arkadaşlar"
19
24
  no_followers: "Şu anda herhangi bir kişiyi yok"
20
25
  no_friends: "Şu anda herhangi bir arkadaş yok"
21
26
  not_following_anyone: "Şu anda herkes aşağıdaki değildir"
@@ -9,13 +9,18 @@ uk:
9
9
  accept: (прийняти)
10
10
  delete: (видалення)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: Послідовники
13
+ following: Наступне
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: "Інший Запит"
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "Інший запит до {{link}}"
15
18
  friend_request_sent: "Інший Запит надіслано"
19
+ friends: Друзі
16
20
  friends_title: "Мої друзі"
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (ігнорувати)
23
+ mutual_friends: "Спільні друзі"
19
24
  no_followers: "Ви в даний час не мають яких-небудь послідовники"
20
25
  no_friends: "Ви в даний час не мають яких-небудь друзі"
21
26
  not_following_anyone: "В даний час ви не хто наступний"
@@ -9,13 +9,18 @@ vi:
9
9
  accept: "(chấp nhận)"
10
10
  delete: (xóa)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: Những
13
+ following: Sau
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: "Yêu cầu bạn bè"
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "Bạn bè đang chờ giải quyết yêu cầu {{link}}"
15
18
  friend_request_sent: "Yêu cầu người bạn đã gửi"
19
+ friends: "Bạn bè"
16
20
  friends_title: "Bạn bè của tôi"
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: "(bỏ qua)"
23
+ mutual_friends: "Cùng bạn bè"
19
24
  no_followers: "Bạn hiện tại không có bất kỳ những"
20
25
  no_friends: "Bạn hiện tại không có bất cứ bạn bè"
21
26
  not_following_anyone: "Bạn không có hiện sau đây bất cứ ai"
@@ -9,13 +9,18 @@ zh-CN:
9
9
  accept: (接受)
10
10
  delete: (删除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: 追随者
13
+ following: 下列的
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: 朋友的要求
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "朋友的要求待{{link}}"
15
18
  friend_request_sent: 朋友要求传送
19
+ friends: 朋友们
16
20
  friends_title: 我的朋友
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (忽略)
23
+ mutual_friends: 共同的朋友
19
24
  no_followers: 您目前还没有任何的追随者
20
25
  no_friends: 您目前还没有任何朋友
21
26
  not_following_anyone: 您目前没有任何人后
@@ -9,13 +9,18 @@ zh-TW:
9
9
  accept: (接受)
10
10
  delete: (刪除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: 追隨者
13
+ following: 下列的
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: 朋友的要求
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "朋友的要求待{{link}}"
15
18
  friend_request_sent: 朋友要求傳送
19
+ friends: 朋友們
16
20
  friends_title: 我的朋友
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (忽略)
23
+ mutual_friends: 共同的朋友
19
24
  no_followers: 您目前還沒有任何的追隨者
20
25
  no_friends: 您目前還沒有任何朋友
21
26
  not_following_anyone: 您目前沒有任何人後
@@ -9,13 +9,18 @@ zh:
9
9
  accept: (接受)
10
10
  delete: (删除)
11
11
  follow_activity: "{{inviter}} is now following {{invited}}"
12
+ followers: 追随者
13
+ following: 下列的
12
14
  following_you: "{{name}} is now following you on {{application_name}}"
13
15
  friend_request: 朋友的要求
16
+ friend_request_links: "{{profile}} sent you a friend request {{accept}} {{ignore}}"
14
17
  friend_request_pending: "朋友的要求待{{link}}"
15
18
  friend_request_sent: 朋友要求传送
19
+ friends: 朋友们
16
20
  friends_title: 我的朋友
17
21
  friends_with: "{{inviter}} is now friends with {{invited}}"
18
22
  ignore: (忽略)
23
+ mutual_friends: 共同的朋友
19
24
  no_followers: 您目前还没有任何的追随者
20
25
  no_friends: 您目前还没有任何朋友
21
26
  not_following_anyone: 您目前没有任何人后
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-friends}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Ball"]
9
- s.date = %q{2009-07-07}
9
+ s.date = %q{2009-07-08}
10
10
  s.description = %q{Friend engine for the muck system.}
11
11
  s.email = %q{justinball@gmail.com}
12
12
  s.extra_rdoc_files = [
@@ -27,10 +27,10 @@ Gem::Specification.new do |s|
27
27
  "app/views/friend_mailer/follow.text.plain.erb",
28
28
  "app/views/friend_mailer/friend_request.text.html.erb",
29
29
  "app/views/friend_mailer/friend_request.text.plain.erb",
30
+ "app/views/friends/_all_friends.html.erb",
31
+ "app/views/friends/_friend_requests.html.erb",
30
32
  "app/views/friends/_friend_simple.html.erb",
31
- "app/views/friends/_friends.html.erb",
32
- "app/views/friends/_notifications.html.erb",
33
- "app/views/friends/friend_or_follow_request.html.erb",
33
+ "app/views/friends/_mutual_friends.html.erb",
34
34
  "app/views/friends/index.html.erb",
35
35
  "config/muck_friends_routes.rb",
36
36
  "db/migrate/20090608073052_create_friends.rb",
@@ -98,9 +98,15 @@ Gem::Specification.new do |s|
98
98
  "test/rails_root/app/models/.keep",
99
99
  "test/rails_root/app/models/activity.rb",
100
100
  "test/rails_root/app/models/friend.rb",
101
+ "test/rails_root/app/models/profile.rb",
101
102
  "test/rails_root/app/models/user.rb",
102
103
  "test/rails_root/app/models/user_session.rb",
103
- "test/rails_root/app/views/default/index.html.erb",
104
+ "test/rails_root/app/views/default/all_friends.html.erb",
105
+ "test/rails_root/app/views/default/followers.html.erb",
106
+ "test/rails_root/app/views/default/followings.html.erb",
107
+ "test/rails_root/app/views/default/friend_requests.html.erb",
108
+ "test/rails_root/app/views/default/friends.html.erb",
109
+ "test/rails_root/app/views/default/mutual_friends.html.erb",
104
110
  "test/rails_root/app/views/layouts/default.html.erb",
105
111
  "test/rails_root/config/amazon_s3.yml",
106
112
  "test/rails_root/config/boot.rb",
@@ -118,6 +124,7 @@ Gem::Specification.new do |s|
118
124
  "test/rails_root/db/.keep",
119
125
  "test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
120
126
  "test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
127
+ "test/rails_root/db/migrate/20090512013727_create_profiles.rb",
121
128
  "test/rails_root/db/migrate/20090602041838_create_users.rb",
122
129
  "test/rails_root/db/migrate/20090608073052_create_friends.rb",
123
130
  "test/rails_root/features/step_definitions/webrat_steps.rb",
@@ -279,6 +286,7 @@ Gem::Specification.new do |s|
279
286
  "test/rails_root/script/server",
280
287
  "test/rails_root/test/factories.rb",
281
288
  "test/rails_root/test/functional/.keep",
289
+ "test/rails_root/test/functional/default_controller_test.rb",
282
290
  "test/rails_root/test/functional/friends_controller_test.rb",
283
291
  "test/rails_root/test/integration/.keep",
284
292
  "test/rails_root/test/mocks/development/.keep",
@@ -320,6 +328,7 @@ Gem::Specification.new do |s|
320
328
  "test/rails_root/app/helpers/application_helper.rb",
321
329
  "test/rails_root/app/models/activity.rb",
322
330
  "test/rails_root/app/models/friend.rb",
331
+ "test/rails_root/app/models/profile.rb",
323
332
  "test/rails_root/app/models/user.rb",
324
333
  "test/rails_root/app/models/user_session.rb",
325
334
  "test/rails_root/config/boot.rb",
@@ -334,6 +343,7 @@ Gem::Specification.new do |s|
334
343
  "test/rails_root/config/routes.rb",
335
344
  "test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
336
345
  "test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
346
+ "test/rails_root/db/migrate/20090512013727_create_profiles.rb",
337
347
  "test/rails_root/db/migrate/20090602041838_create_users.rb",
338
348
  "test/rails_root/db/migrate/20090608073052_create_friends.rb",
339
349
  "test/rails_root/db/schema.rb",
@@ -342,6 +352,7 @@ Gem::Specification.new do |s|
342
352
  "test/rails_root/public/dispatch.rb",
343
353
  "test/rails_root/script/create_project.rb",
344
354
  "test/rails_root/test/factories.rb",
355
+ "test/rails_root/test/functional/default_controller_test.rb",
345
356
  "test/rails_root/test/functional/friends_controller_test.rb",
346
357
  "test/rails_root/test/shoulda_macros/controller.rb",
347
358
  "test/rails_root/test/shoulda_macros/forms.rb",
@@ -13,3 +13,4 @@ require 'muck_engine/tasks'
13
13
  require 'muck_users/tasks'
14
14
  require 'muck_activities/tasks'
15
15
  require 'muck_friends/tasks'
16
+ require 'muck_profiles/tasks'
@@ -1,7 +1,9 @@
1
1
  class DefaultController < ApplicationController
2
+ before_filter :get_user
2
3
 
3
- def index
4
- @user = User.create
4
+ def get_user
5
+ # a bit of a hack but this grabs the 'other_user' stubbed out in the test and makes @user available to helper methods
6
+ @user = other_user
5
7
  end
6
8
 
7
9
  end
@@ -0,0 +1,3 @@
1
+ class Profile < ActiveRecord::Base
2
+ acts_as_muck_profile
3
+ end
@@ -4,5 +4,6 @@ class User < ActiveRecord::Base
4
4
  end
5
5
  acts_as_muck_user
6
6
  acts_as_muck_friend_user
7
+ has_muck_profile
7
8
  has_activities
8
9
  end
@@ -0,0 +1 @@
1
+ <%= followers(current_user) %>
@@ -0,0 +1 @@
1
+ <%= followings(current_user) %>
@@ -0,0 +1 @@
1
+ <%= friend_requests(current_user) %>
@@ -0,0 +1 @@
1
+ <%= friends(current_user) %>
@@ -0,0 +1 @@
1
+ <%= mutual_friends(current_user, @user) %>
@@ -17,6 +17,7 @@ Rails::Initializer.run do |config|
17
17
  config.time_zone = 'UTC'
18
18
  config.gem "authlogic"
19
19
  config.gem "bcrypt-ruby", :lib => "bcrypt"
20
+ config.gem 'thoughtbot-paperclip', :lib => 'paperclip', :source => "http://gems.github.com"
20
21
  config.gem 'muck-engine', :lib => 'muck_engine'
21
22
  config.gem 'muck-users', :lib => 'muck_users'
22
23
  config.gem 'muck-profiles', :lib => 'muck_profiles'
@@ -1,3 +1,5 @@
1
1
  ActionController::Routing::Routes.draw do |map|
2
- map.root :controller => 'default', :action => 'index'
2
+ map.connect ':controller/:action/:id'
3
+ map.connect ':controller/:action/:id.:format'
4
+
3
5
  end
@@ -0,0 +1,21 @@
1
+ class CreateProfiles < ActiveRecord::Migration
2
+
3
+ def self.up
4
+
5
+ create_table :profiles, :force => true do |t|
6
+ t.integer :user_id
7
+ t.string :photo_file_name
8
+ t.string :photo_content_type
9
+ t.integer :photo_file_size
10
+ t.timestamps
11
+ end
12
+
13
+ add_index :profiles, ['user_id']
14
+
15
+ end
16
+
17
+ def self.down
18
+ drop_table :profiles
19
+ end
20
+
21
+ end
@@ -0,0 +1,101 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ # this tests the friends helper methods
4
+ class Muck::DefaultControllerTest < ActionController::TestCase
5
+
6
+ tests DefaultController
7
+
8
+ context "" do
9
+ setup do
10
+ @aaron = Factory(:user)
11
+ @quentin = Factory(:user)
12
+ @follower1 = Factory(:user)
13
+ @follower2 = Factory(:user)
14
+ @friend1 = Factory(:user)
15
+ @friend2 = Factory(:user)
16
+ @friend3 = Factory(:user)
17
+ @mutual_friend1 = Factory(:user)
18
+ @mutual_friend2 = Factory(:user)
19
+
20
+ # aaron's followers
21
+ @follower1.follow(@aaron)
22
+ @follower2.follow(@aaron)
23
+
24
+ # aaron's friends
25
+ @friend1.follow(@aaron)
26
+ @friend2.follow(@aaron)
27
+ @friend2.follow(@aaron)
28
+ @aaron.become_friends_with(@friend1)
29
+ @aaron.become_friends_with(@friend2)
30
+ @aaron.become_friends_with(@friend3)
31
+
32
+ # mutual friends
33
+ @mutual_friend1.follow(@aaron)
34
+ @mutual_friend2.follow(@aaron)
35
+ @aaron.become_friends_with(@mutual_friend1)
36
+ @aaron.become_friends_with(@mutual_friend2)
37
+
38
+ @mutual_friend1.follow(@quentin)
39
+ @mutual_friend2.follow(@quentin)
40
+ @quentin.become_friends_with(@mutual_friend1)
41
+ @quentin.become_friends_with(@mutual_friend2)
42
+
43
+ @controller.stubs(:current_user).returns(@aaron)
44
+ @controller.stubs(:other_user).returns(@quentin)
45
+ end
46
+
47
+ context 'all friends' do
48
+ setup do
49
+ get :all_friends
50
+ end
51
+ should_respond_with :success
52
+ should_render_template :all_friends
53
+ end
54
+
55
+ context 'mutual friends' do
56
+ setup do
57
+ get :mutual_friends
58
+ end
59
+ should_respond_with :success
60
+ should_render_template :mutual_friends
61
+ end
62
+
63
+ context 'friends' do
64
+ setup do
65
+ get :friends
66
+ end
67
+ should_respond_with :success
68
+ should_render_template :friends
69
+ end
70
+
71
+ context 'followers' do
72
+ setup do
73
+ get :followers
74
+ end
75
+ should_respond_with :success
76
+ should_render_template :followers
77
+ end
78
+
79
+ context 'followings' do
80
+ setup do
81
+ get :followings
82
+ end
83
+ should_respond_with :success
84
+ should_render_template :followings
85
+ end
86
+
87
+ context 'friend requests' do
88
+ setup do
89
+ @allow_following = GlobalConfig.allow_following
90
+ GlobalConfig.allow_following = false
91
+ get :friend_requests
92
+ end
93
+ teardown do
94
+ GlobalConfig.allow_following = @allow_following
95
+ end
96
+ should_respond_with :success
97
+ should_render_template :friend_requests
98
+ end
99
+
100
+ end
101
+ end