projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use named binding to conditionally join object
[akkoma]
/
test
/
tasks
/
user_test.exs
diff --git
a/test/tasks/user_test.exs
b/test/tasks/user_test.exs
index 242265da5c48b68a75bd212d4e8ab65a446cd588..eaf4ecf8449bfe1881a1c99cae5d729d3f8c4e8d 100644
(file)
--- a/
test/tasks/user_test.exs
+++ b/
test/tasks/user_test.exs
@@
-50,7
+50,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ "created"
assert_received {:mix_shell, :info, [message]}
assert message =~ "created"
- user = User.get_by_nickname(unsaved.nickname)
+ user = User.get_
cached_
by_nickname(unsaved.nickname)
assert user.name == unsaved.name
assert user.email == unsaved.email
assert user.bio == unsaved.bio
assert user.name == unsaved.name
assert user.email == unsaved.email
assert user.bio == unsaved.bio
@@
-75,7
+75,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ "will not be created"
assert_received {:mix_shell, :info, [message]}
assert message =~ "will not be created"
- refute User.get_by_nickname(unsaved.nickname)
+ refute User.get_
cached_
by_nickname(unsaved.nickname)
end
end
end
end
@@
-88,7
+88,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ " deleted"
assert_received {:mix_shell, :info, [message]}
assert message =~ " deleted"
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
assert user.info.deactivated
end
assert user.info.deactivated
end
@@
-109,7
+109,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ " deactivated"
assert_received {:mix_shell, :info, [message]}
assert message =~ " deactivated"
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
assert user.info.deactivated
end
assert user.info.deactivated
end
@@
-121,7
+121,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ " activated"
assert_received {:mix_shell, :info, [message]}
assert message =~ " activated"
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
refute user.info.deactivated
end
refute user.info.deactivated
end
@@
-150,7
+150,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ "Successfully unsubscribed"
assert_received {:mix_shell, :info, [message]}
assert message =~ "Successfully unsubscribed"
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
assert Enum.empty?(user.following)
assert user.info.deactivated
end
assert Enum.empty?(user.following)
assert user.info.deactivated
end
@@
-178,7
+178,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ ~r/Admin status .* true/
assert_received {:mix_shell, :info, [message]}
assert message =~ ~r/Admin status .* true/
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
assert user.info.is_moderator
assert user.info.locked
assert user.info.is_admin
assert user.info.is_moderator
assert user.info.locked
assert user.info.is_admin
@@
-204,7
+204,7
@@
defmodule Mix.Tasks.Pleroma.UserTest do
assert_received {:mix_shell, :info, [message]}
assert message =~ ~r/Admin status .* false/
assert_received {:mix_shell, :info, [message]}
assert message =~ ~r/Admin status .* false/
- user = User.get_by_nickname(user.nickname)
+ user = User.get_
cached_
by_nickname(user.nickname)
refute user.info.is_moderator
refute user.info.locked
refute user.info.is_admin
refute user.info.is_moderator
refute user.info.locked
refute user.info.is_admin