Sources: get correct mastodon page url
This commit is contained in:
@@ -85,7 +85,7 @@ module Sources::Strategies
|
|||||||
end
|
end
|
||||||
|
|
||||||
def artist_name_from_url
|
def artist_name_from_url
|
||||||
url[NAMED_PROFILE, :artist_name]
|
urls.map { |url| url[NAMED_PROFILE, :artist_name] }.compact.first
|
||||||
end
|
end
|
||||||
|
|
||||||
def other_names
|
def other_names
|
||||||
@@ -93,7 +93,7 @@ module Sources::Strategies
|
|||||||
end
|
end
|
||||||
|
|
||||||
def account_id
|
def account_id
|
||||||
url[ID_PROFILE, :account_id] || api_response.account_id
|
urls.map { |url| url[ID_PROFILE, :account_id] }.compact.first || api_response.account_id
|
||||||
end
|
end
|
||||||
|
|
||||||
def status_id_from_url
|
def status_id_from_url
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ module Sources
|
|||||||
should "fetch the source data" do
|
should "fetch the source data" do
|
||||||
assert_equal("evazion", @site.artist_name)
|
assert_equal("evazion", @site.artist_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "correctly get the page url" do
|
||||||
|
assert_equal(@ref, @site.page_url)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "A baraag url" do
|
context "A baraag url" do
|
||||||
|
|||||||
Reference in New Issue
Block a user