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

@ -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

View file

@ -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}"

View file

@ -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