Adding more unit tests. Fixing Salmon slaps XML
This commit is contained in:
parent
446267d1bf
commit
720ff55262
13 changed files with 363 additions and 58 deletions
|
@ -31,14 +31,10 @@ class FavouriteService < BaseService
|
|||
end
|
||||
|
||||
object_type xml, :activity
|
||||
verb xml, :favourite
|
||||
verb xml, :favorite
|
||||
|
||||
target(xml) do
|
||||
author(xml) do
|
||||
include_author xml, favourite.status.account
|
||||
end
|
||||
|
||||
include_entry xml, favourite.status.stream_entry
|
||||
include_target xml, favourite.status
|
||||
end
|
||||
end
|
||||
end.to_xml
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
class FetchAtomService < BaseService
|
||||
def call(url)
|
||||
return if url.blank?
|
||||
|
||||
response = http_client.head(url)
|
||||
|
||||
Rails.logger.debug "Remote status HEAD request returned code #{response.code}"
|
||||
|
|
|
@ -22,14 +22,10 @@ class UnfavouriteService < BaseService
|
|||
end
|
||||
|
||||
object_type xml, :activity
|
||||
verb xml, :unfavourite
|
||||
verb xml, :unfavorite
|
||||
|
||||
target(xml) do
|
||||
author(xml) do
|
||||
include_author xml, favourite.status.account
|
||||
end
|
||||
|
||||
include_entry xml, favourite.status.stream_entry
|
||||
include_target xml, favourite.status
|
||||
end
|
||||
end
|
||||
end.to_xml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue