removes unused method
This commit is contained in:
@@ -90,10 +90,6 @@ class Comment < ActiveRecord::Base
|
||||
!root?
|
||||
end
|
||||
|
||||
def made_by?(user)
|
||||
self.user == user
|
||||
end
|
||||
|
||||
def call_after_commented
|
||||
self.commentable.try(:after_commented)
|
||||
end
|
||||
|
||||
@@ -129,18 +129,4 @@ describe Comment do
|
||||
end
|
||||
end
|
||||
|
||||
describe "#made_by?" do
|
||||
let(:author) { create :user }
|
||||
let(:comment) { create :comment, user: author }
|
||||
|
||||
it "returns true if comment was made by user" do
|
||||
expect(comment.made_by?(author)).to be true
|
||||
end
|
||||
|
||||
it "returns false if comment was not made by user" do
|
||||
not_author = create :user
|
||||
expect(comment.made_by?(not_author)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user