projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1916-transmogrifier-skipping-oddities-in-address-fields' into 'develop'
[akkoma]
/
test
/
web
/
twitter_api
/
twitter_api_test.exs
diff --git
a/test/web/twitter_api/twitter_api_test.exs
b/test/web/twitter_api/twitter_api_test.exs
index 7926a075789ba6b64168e5e5252048bc4bdd40ec..368533292bdc8b4acfb6aeac8ebe8afc70813b19 100644
(file)
--- a/
test/web/twitter_api/twitter_api_test.exs
+++ b/
test/web/twitter_api/twitter_api_test.exs
@@
-18,7
+18,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "it registers a new user and returns the user." do
data = %{
test "it registers a new user and returns the user." do
data = %{
- :
nick
name => "lain",
+ :
user
name => "lain",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:password => "bear",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:password => "bear",
@@
-35,7
+35,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "it registers a new user with empty string in bio and returns the user." do
data = %{
test "it registers a new user with empty string in bio and returns the user." do
data = %{
- :
nick
name => "lain",
+ :
user
name => "lain",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "",
@@
-60,7
+60,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
end
data = %{
end
data = %{
- :
nick
name => "lain",
+ :
user
name => "lain",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "",
@@
-87,7
+87,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "it registers a new user and parses mentions in the bio" do
data1 = %{
test "it registers a new user and parses mentions in the bio" do
data1 = %{
- :
nick
name => "john",
+ :
user
name => "john",
:email => "john@gmail.com",
:fullname => "John Doe",
:bio => "test",
:email => "john@gmail.com",
:fullname => "John Doe",
:bio => "test",
@@
-98,7
+98,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
{:ok, user1} = TwitterAPI.register_user(data1)
data2 = %{
{:ok, user1} = TwitterAPI.register_user(data1)
data2 = %{
- :
nick
name => "lain",
+ :
user
name => "lain",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "@john test",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:bio => "@john test",
@@
-123,7
+123,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
{:ok, invite} = UserInviteToken.create_invite()
data = %{
{:ok, invite} = UserInviteToken.create_invite()
data = %{
- :
nick
name => "vinny",
+ :
user
name => "vinny",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
@@
-145,7
+145,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "returns error on invalid token" do
data = %{
test "returns error on invalid token" do
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-165,7
+165,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
UserInviteToken.update_invite!(invite, used: true)
data = %{
UserInviteToken.update_invite!(invite, used: true)
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-186,7
+186,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
setup do
data = %{
setup do
data = %{
- :
nick
name => "vinny",
+ :
user
name => "vinny",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
@@
-250,7
+250,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
UserInviteToken.update_invite!(invite, uses: 99)
data = %{
UserInviteToken.update_invite!(invite, uses: 99)
data = %{
- :
nick
name => "vinny",
+ :
user
name => "vinny",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
@@
-269,7
+269,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
AccountView.render("show.json", %{user: fetched_user})
data = %{
AccountView.render("show.json", %{user: fetched_user})
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-292,7
+292,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
{:ok, invite} = UserInviteToken.create_invite(%{expires_at: Date.utc_today(), max_use: 100})
data = %{
{:ok, invite} = UserInviteToken.create_invite(%{expires_at: Date.utc_today(), max_use: 100})
data = %{
- :
nick
name => "vinny",
+ :
user
name => "vinny",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
@@
-317,7
+317,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
UserInviteToken.update_invite!(invite, uses: 99)
data = %{
UserInviteToken.update_invite!(invite, uses: 99)
data = %{
- :
nick
name => "vinny",
+ :
user
name => "vinny",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
:email => "pasta@pizza.vs",
:fullname => "Vinny Vinesauce",
:bio => "streamer",
@@
-335,7
+335,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
AccountView.render("show.json", %{user: fetched_user})
data = %{
AccountView.render("show.json", %{user: fetched_user})
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-355,7
+355,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
UserInviteToken.create_invite(%{expires_at: Date.add(Date.utc_today(), -1), max_use: 100})
data = %{
UserInviteToken.create_invite(%{expires_at: Date.add(Date.utc_today(), -1), max_use: 100})
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-377,7
+377,7
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
UserInviteToken.update_invite!(invite, uses: 100)
data = %{
UserInviteToken.update_invite!(invite, uses: 100)
data = %{
- :
nick
name => "GrimReaper",
+ :
user
name => "GrimReaper",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
:email => "death@reapers.afterlife",
:fullname => "Reaper Grim",
:bio => "Your time has come",
@@
-395,16
+395,15
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "it returns the error on registration problems" do
data = %{
test "it returns the error on registration problems" do
data = %{
- :
nick
name => "lain",
+ :
user
name => "lain",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
:email => "lain@wired.jp",
:fullname => "lain iwakura",
- :bio => "close the world.",
- :password => "bear"
+ :bio => "close the world."
}
}
- {:error, error
_object
} = TwitterAPI.register_user(data)
+ {:error, error} = TwitterAPI.register_user(data)
- assert is_binary(error
_object[:error]
)
+ assert is_binary(error)
refute User.get_cached_by_nickname("lain")
end
refute User.get_cached_by_nickname("lain")
end