summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/poll_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-05-13 12:42:36 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-05-13 12:42:36 +0300
commitfd2fb2bb2e2292997fbe6f70c4d12b50c56cfab9 (patch)
tree12f2ac82ed24394fb52b5d0664583dc668814421 /test/web/mastodon_api/controllers/poll_controller_test.exs
parentbfb48e3db6009c31e52cfe5ac4828a6143d7e549 (diff)
parent156c8a508846bd6d4e55f666c4ecc6f0129ac5fc (diff)
downloadpleroma-fd2fb2bb2e2292997fbe6f70c4d12b50c56cfab9.tar.gz
pleroma-fd2fb2bb2e2292997fbe6f70c4d12b50c56cfab9.zip
Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
# Conflicts: # lib/pleroma/web/mastodon_api/controllers/status_controller.ex # lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex # test/web/mastodon_api/controllers/timeline_controller_test.exs # test/web/mastodon_api/views/status_view_test.exs
Diffstat (limited to 'test/web/mastodon_api/controllers/poll_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/poll_controller_test.exs38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/web/mastodon_api/controllers/poll_controller_test.exs b/test/web/mastodon_api/controllers/poll_controller_test.exs
index d8f34aa86..f41de6448 100644
--- a/test/web/mastodon_api/controllers/poll_controller_test.exs
+++ b/test/web/mastodon_api/controllers/poll_controller_test.exs
@@ -16,8 +16,8 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
test "returns poll entity for object id", %{user: user, conn: conn} do
{:ok, activity} =
CommonAPI.post(user, %{
- "status" => "Pleroma does",
- "poll" => %{"options" => ["what Mastodon't", "n't what Mastodoes"], "expires_in" => 20}
+ status: "Pleroma does",
+ poll: %{options: ["what Mastodon't", "n't what Mastodoes"], expires_in: 20}
})
object = Object.normalize(activity)
@@ -34,9 +34,9 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
{:ok, activity} =
CommonAPI.post(other_user, %{
- "status" => "Pleroma does",
- "poll" => %{"options" => ["what Mastodon't", "n't what Mastodoes"], "expires_in" => 20},
- "visibility" => "private"
+ status: "Pleroma does",
+ poll: %{options: ["what Mastodon't", "n't what Mastodoes"], expires_in: 20},
+ visibility: "private"
})
object = Object.normalize(activity)
@@ -55,11 +55,11 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
{:ok, activity} =
CommonAPI.post(other_user, %{
- "status" => "A very delicious sandwich",
- "poll" => %{
- "options" => ["Lettuce", "Grilled Bacon", "Tomato"],
- "expires_in" => 20,
- "multiple" => true
+ status: "A very delicious sandwich",
+ poll: %{
+ options: ["Lettuce", "Grilled Bacon", "Tomato"],
+ expires_in: 20,
+ multiple: true
}
})
@@ -81,8 +81,8 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
test "author can't vote", %{user: user, conn: conn} do
{:ok, activity} =
CommonAPI.post(user, %{
- "status" => "Am I cute?",
- "poll" => %{"options" => ["Yes", "No"], "expires_in" => 20}
+ status: "Am I cute?",
+ poll: %{options: ["Yes", "No"], expires_in: 20}
})
object = Object.normalize(activity)
@@ -102,8 +102,8 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
{:ok, activity} =
CommonAPI.post(other_user, %{
- "status" => "The glass is",
- "poll" => %{"options" => ["half empty", "half full"], "expires_in" => 20}
+ status: "The glass is",
+ poll: %{options: ["half empty", "half full"], expires_in: 20}
})
object = Object.normalize(activity)
@@ -125,8 +125,8 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
{:ok, activity} =
CommonAPI.post(other_user, %{
- "status" => "Am I cute?",
- "poll" => %{"options" => ["Yes", "No"], "expires_in" => 20}
+ status: "Am I cute?",
+ poll: %{options: ["Yes", "No"], expires_in: 20}
})
object = Object.normalize(activity)
@@ -153,9 +153,9 @@ defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
{:ok, activity} =
CommonAPI.post(other_user, %{
- "status" => "Am I cute?",
- "poll" => %{"options" => ["Yes", "No"], "expires_in" => 20},
- "visibility" => "private"
+ status: "Am I cute?",
+ poll: %{options: ["Yes", "No"], expires_in: 20},
+ visibility: "private"
})
object = Object.normalize(activity)