Adding a bunch of tests
This commit is contained in:
parent
44c5958203
commit
f16b31f077
22 changed files with 439 additions and 105 deletions
|
@ -54,10 +54,9 @@ class Status < ActiveRecord::Base
|
|||
|
||||
unless reblog?
|
||||
self.text.scan(Account::MENTION_RE).each do |match|
|
||||
uri = match.first
|
||||
username = uri.split('@').first
|
||||
domain = uri.split('@').size == 2 ? uri.split('@').last : nil
|
||||
account = Account.find_by(username: username, domain: domain)
|
||||
uri = match.first
|
||||
username, domain = uri.split('@')
|
||||
account = Account.find_by(username: username, domain: domain)
|
||||
|
||||
m << account unless account.nil?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue