Services specs for subscribe and unsubscribe (#2928)
* Add specs for unsubscribe service * Fix non existent methods in unsubscribe service * Clean up status handling in subscribe service
This commit is contained in:
committed by
Eugen Rochko
parent
04166c4a35
commit
5bea42412e
@ -5,8 +5,8 @@ class UnsubscribeService < BaseService
|
||||
subscription = account.subscription(api_subscription_url(account.id))
|
||||
response = subscription.unsubscribe
|
||||
|
||||
unless response.successful?
|
||||
Rails.logger.debug "PuSH unsubscribe for #{account.acct} failed: #{response.message}"
|
||||
unless response.status.success?
|
||||
Rails.logger.debug "PuSH unsubscribe for #{account.acct} failed: #{response.status}"
|
||||
end
|
||||
|
||||
account.secret = ''
|
||||
|
Reference in New Issue
Block a user