0
0
Fork 0

Adding more unit tests. Fixing Salmon slaps XML

This commit is contained in:
Eugen Rochko 2017-02-12 17:28:15 +01:00
parent 446267d1bf
commit 720ff55262
13 changed files with 363 additions and 58 deletions

View file

@ -9,7 +9,7 @@ class AfterRemoteFollowRequestWorker
follow_request = FollowRequest.find(follow_request_id)
updated_account = FetchRemoteAccountService.new.call(follow_request.target_account.remote_url)
return if updated_account.locked?
return if updated_account.nil? || updated_account.locked?
follow_request.destroy
FollowService.new.call(follow_request.account, updated_account.acct)

View file

@ -9,7 +9,7 @@ class AfterRemoteFollowWorker
follow = Follow.find(follow_id)
updated_account = FetchRemoteAccountService.new.call(follow.target_account.remote_url)
return unless updated_account.locked?
return if updated_account.nil? || !updated_account.locked?
follow.destroy
FollowService.new.call(follow.account, updated_account.acct)