removes unused method

This commit is contained in:
Juanjo Bazán
2016-01-08 12:35:56 +01:00
parent ab74bd58fa
commit 790d8de5b6
2 changed files with 0 additions and 18 deletions

View File

@@ -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

View File

@@ -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