Merge pull request #4737 from nonamethanks/fix-mastodon-page-url
Sources: get correct mastodon page url
This commit is contained in:
@@ -86,7 +86,7 @@ module Sources::Strategies
|
||||
end
|
||||
|
||||
def artist_name_from_url
|
||||
url[NAMED_PROFILE, :artist_name]
|
||||
urls.map { |url| url[NAMED_PROFILE, :artist_name] }.compact.first
|
||||
end
|
||||
|
||||
def other_names
|
||||
@@ -94,7 +94,7 @@ module Sources::Strategies
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
def status_id_from_url
|
||||
|
||||
@@ -95,6 +95,10 @@ module Sources
|
||||
should "fetch the source data" do
|
||||
assert_equal("evazion", @site.artist_name)
|
||||
end
|
||||
|
||||
should "correctly get the page url" do
|
||||
assert_equal(@ref, @site.page_url)
|
||||
end
|
||||
end
|
||||
|
||||
context "A baraag url" do
|
||||
|
||||
Reference in New Issue
Block a user