Fixes with addresses and iCalendar
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -36,8 +36,10 @@ defmodule MobilizonWeb.FeedControllerTest do
|
||||
assert entry.title in [event1.title, event2.title]
|
||||
end)
|
||||
|
||||
assert entry1.categories == [tag2.slug, tag1.slug]
|
||||
assert entry2.categories == [tag1.slug]
|
||||
# It seems categories takes term instead of Label
|
||||
# <category label=\"RSS\" term=\"rss\"/>
|
||||
assert entry1.categories == [tag2.title, tag1.title] |> Enum.map(&String.downcase/1)
|
||||
assert entry2.categories == [tag1.title] |> Enum.map(&String.downcase/1)
|
||||
end
|
||||
|
||||
test "it returns a 404 for the actor's public events Atom feed if the actor is not publicly visible",
|
||||
@@ -112,8 +114,8 @@ defmodule MobilizonWeb.FeedControllerTest do
|
||||
assert entry.summary in [event1.title, event2.title]
|
||||
end)
|
||||
|
||||
assert entry1.categories == [tag1.slug]
|
||||
assert entry2.categories == [tag1.slug, tag2.slug]
|
||||
assert entry1.categories == [tag1.title]
|
||||
assert entry2.categories == [tag1.title, tag2.title]
|
||||
end
|
||||
|
||||
test "it returns a 404 page for the actor's public events iCal feed with an actor not publicly visible",
|
||||
@@ -183,7 +185,7 @@ defmodule MobilizonWeb.FeedControllerTest do
|
||||
|
||||
assert entry1.summary == event1.title
|
||||
|
||||
assert entry1.categories == [tag1.slug, tag2.slug]
|
||||
assert entry1.categories == [tag1.title, tag2.title]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -325,7 +327,7 @@ defmodule MobilizonWeb.FeedControllerTest do
|
||||
|
||||
[entry1] = ExIcal.parse(conn.resp_body)
|
||||
assert entry1.summary == event1.title
|
||||
assert entry1.categories == event1.tags |> Enum.map(& &1.slug)
|
||||
assert entry1.categories == event1.tags |> Enum.map(& &1.title)
|
||||
end
|
||||
|
||||
test "it returns 404 for an not existing feed", %{conn: conn} do
|
||||
|
||||
Reference in New Issue
Block a user