diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-14 21:17:07 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-15 03:17:07 +0200 |
commit | 40fd1de4889584900eeea26514c251ca62fa95f5 (patch) | |
tree | 9b8184be19dfe6b572eb9b5acaff6bc3706c26d5 /spec/mailers | |
parent | 31f0bcf8045e4502a38c019004abe63786641682 (diff) |
Account search service refactor (#1791)
* Begin coverage for account search service * Coverage for hashtag query * Coverage for calling local vs remote find based on domain presence * Spec to check that exact matches are not duped * Coverage of resolve option * Coverage for account being provided * Start to refactor account search service * Isolate query username and domain methods * Isolate exact_match method * Extract methods for local and remote results * Simplify local vs remote and account isoliation * Extract methods for local and remote results * Simplify de-dupe of exact match * Simplify logic to check for non exact remotes * Cache some methods * Remove nil from exact_match from results array * Return exact matches first * Use find_remote even with no domain Account.find_local is just an alias for Account.find_remote(user, nil) - so we can not bother with the conditional here, and call find_remote directly.
Diffstat (limited to 'spec/mailers')
0 files changed, 0 insertions, 0 deletions