diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-05-08 18:45:02 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-09 00:45:02 +0200 |
commit | 5bea42412e41b1121af04dbe6ef5c9bed22219b8 (patch) | |
tree | f121a12cd27f567f8d7d7f7066ff302240d24dd2 /app/services/unsubscribe_service.rb | |
parent | 04166c4a35c97f5540252617c7858bf20d315a7e (diff) |
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
Diffstat (limited to 'app/services/unsubscribe_service.rb')
-rw-r--r-- | app/services/unsubscribe_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/unsubscribe_service.rb b/app/services/unsubscribe_service.rb index 1a951d1b4..6db8dbdc4 100644 --- a/app/services/unsubscribe_service.rb +++ b/app/services/unsubscribe_service.rb @@ -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 = '' |