about summary refs log tree commit diff
path: root/app/models/follow_request.rb
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2017-11-09 22:36:52 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-11-09 14:36:52 +0100
commit54b42901df938257ae660168958fffe58b1a0287 (patch)
treea5842b3b5cc335c22c1d4a1612d856838fe2b70f /app/models/follow_request.rb
parentd200e041fe50b5c9253991a8884791c75255d457 (diff)
Add and Remove tests for FollowRequest (#5622)
* Add a test for FollowRequest#authorize!

* Remove tests

There is no need to test
ActiveModel::Validations::ClassMethods#validates.

* Make an alias of destroy! as reject!

Instead of defining the method,
make an alias of destroy! as reject! because of reducing test.
Diffstat (limited to 'app/models/follow_request.rb')
-rw-r--r--app/models/follow_request.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb
index 60036d903..458bcd28a 100644
--- a/app/models/follow_request.rb
+++ b/app/models/follow_request.rb
@@ -27,7 +27,5 @@ class FollowRequest < ApplicationRecord
     destroy!
   end
 
-  def reject!
-    destroy!
-  end
+  alias reject! destroy!
 end