Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8bb7e19b
Verified
Commit
8bb7e19b
authored
Feb 10, 2019
by
Haelwenn
Browse files
test: de-group alias/es
parent
89b6f255
Changes
27
Hide whitespace changes
Inline
Side-by-side
test/notification_test.exs
View file @
8bb7e19b
...
...
@@ -6,7 +6,8 @@ defmodule Pleroma.NotificationTest do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
TwitterAPI
.
TwitterAPI
alias
Pleroma
.
Web
.
CommonAPI
alias
Pleroma
.
{
User
,
Notification
}
alias
Pleroma
.
User
alias
Pleroma
.
Notification
alias
Pleroma
.
Web
.
ActivityPub
.
Transmogrifier
import
Pleroma
.
Factory
...
...
test/object_test.exs
View file @
8bb7e19b
...
...
@@ -5,7 +5,8 @@
defmodule
Pleroma
.
ObjectTest
do
use
Pleroma
.
DataCase
import
Pleroma
.
Factory
alias
Pleroma
.
{
Repo
,
Object
}
alias
Pleroma
.
Repo
alias
Pleroma
.
Object
test
"returns an object by it's AP id"
do
object
=
insert
(
:note
)
...
...
test/support/builders/user_builder.ex
View file @
8bb7e19b
defmodule
Pleroma
.
Builders
.
UserBuilder
do
alias
Pleroma
.
{
User
,
Repo
}
alias
Pleroma
.
User
alias
Pleroma
.
Repo
def
build
(
data
\\
%{})
do
user
=
%
User
{
...
...
test/tasks/relay_test.exs
View file @
8bb7e19b
...
...
@@ -4,7 +4,9 @@
defmodule
Mix
.
Tasks
.
Pleroma
.
RelayTest
do
alias
Pleroma
.
Activity
alias
Pleroma
.
Web
.
ActivityPub
.
{
ActivityPub
,
Relay
,
Utils
}
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
alias
Pleroma
.
Web
.
ActivityPub
.
Utils
alias
Pleroma
.
Web
.
ActivityPub
.
Relay
alias
Pleroma
.
User
use
Pleroma
.
DataCase
...
...
test/user_test.exs
View file @
8bb7e19b
...
...
@@ -4,7 +4,9 @@
defmodule
Pleroma
.
UserTest
do
alias
Pleroma
.
Builders
.
UserBuilder
alias
Pleroma
.
{
User
,
Repo
,
Activity
}
alias
Pleroma
.
Activity
alias
Pleroma
.
Repo
alias
Pleroma
.
User
alias
Pleroma
.
Web
.
CommonAPI
use
Pleroma
.
DataCase
...
...
test/web/activity_pub/activity_pub_controller_test.exs
View file @
8bb7e19b
...
...
@@ -5,8 +5,13 @@
defmodule
Pleroma
.
Web
.
ActivityPub
.
ActivityPubControllerTest
do
use
Pleroma
.
Web
.
ConnCase
import
Pleroma
.
Factory
alias
Pleroma
.
Web
.
ActivityPub
.
{
UserView
,
ObjectView
}
alias
Pleroma
.
{
Object
,
Repo
,
Activity
,
User
,
Instances
}
alias
Pleroma
.
Web
.
ActivityPub
.
UserView
alias
Pleroma
.
Web
.
ActivityPub
.
ObjectView
alias
Pleroma
.
Object
alias
Pleroma
.
Repo
alias
Pleroma
.
Activity
alias
Pleroma
.
User
alias
Pleroma
.
Instances
setup_all
do
Tesla
.
Mock
.
mock_global
(
fn
env
->
apply
(
HttpRequestMock
,
:request
,
[
env
])
end
)
...
...
test/web/activity_pub/activity_pub_test.exs
View file @
8bb7e19b
...
...
@@ -7,7 +7,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
alias
Pleroma
.
Web
.
ActivityPub
.
Utils
alias
Pleroma
.
Web
.
CommonAPI
alias
Pleroma
.
{
Activity
,
Object
,
User
,
Instances
}
alias
Pleroma
.
Activity
alias
Pleroma
.
Object
alias
Pleroma
.
User
alias
Pleroma
.
Instances
alias
Pleroma
.
Builders
.
ActivityBuilder
import
Pleroma
.
Factory
...
...
test/web/admin_api/admin_api_controller_test.exs
View file @
8bb7e19b
...
...
@@ -5,7 +5,8 @@
defmodule
Pleroma
.
Web
.
AdminAPI
.
AdminAPIControllerTest
do
use
Pleroma
.
Web
.
ConnCase
alias
Pleroma
.
{
Repo
,
User
}
alias
Pleroma
.
Repo
alias
Pleroma
.
User
import
Pleroma
.
Factory
describe
"/api/pleroma/admin/user"
do
...
...
test/web/common_api/common_api_utils_test.exs
View file @
8bb7e19b
...
...
@@ -5,7 +5,7 @@
defmodule
Pleroma
.
Web
.
CommonAPI
.
UtilsTest
do
alias
Pleroma
.
Web
.
CommonAPI
.
Utils
alias
Pleroma
.
Web
.
Endpoint
alias
Pleroma
.
Builders
.
{
UserBuilder
}
alias
Pleroma
.
Builders
.
UserBuilder
use
Pleroma
.
DataCase
test
"it adds attachment links to a given text and attachment set"
do
...
...
test/web/federator_test.exs
View file @
8bb7e19b
...
...
@@ -3,7 +3,8 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma
.
Web
.
FederatorTest
do
alias
Pleroma
.
Web
.
{
CommonAPI
,
Federator
}
alias
Pleroma
.
Web
.
CommonAPI
alias
Pleroma
.
Web
.
Federator
alias
Pleroma
.
Instances
use
Pleroma
.
DataCase
import
Pleroma
.
Factory
...
...
test/web/mastodon_api/mastodon_api_controller_test.exs
View file @
8bb7e19b
...
...
@@ -6,8 +6,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
use
Pleroma
.
Web
.
ConnCase
alias
Pleroma
.
Web
.
TwitterAPI
.
TwitterAPI
alias
Pleroma
.
{
Repo
,
User
,
Object
,
Activity
,
Notification
}
alias
Pleroma
.
Web
.
{
OStatus
,
CommonAPI
}
alias
Pleroma
.
Repo
alias
Pleroma
.
User
alias
Pleroma
.
Object
alias
Pleroma
.
Activity
alias
Pleroma
.
Notification
alias
Pleroma
.
Web
.
OStatus
alias
Pleroma
.
Web
.
CommonAPI
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
alias
Pleroma
.
Web
.
MastodonAPI
.
FilterView
alias
Ecto
.
Changeset
...
...
test/web/mastodon_api/status_view_test.exs
View file @
8bb7e19b
...
...
@@ -5,7 +5,8 @@
defmodule
Pleroma
.
Web
.
MastodonAPI
.
StatusViewTest
do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
MastodonAPI
.
{
StatusView
,
AccountView
}
alias
Pleroma
.
Web
.
MastodonAPI
.
AccountView
alias
Pleroma
.
Web
.
MastodonAPI
.
StatusView
alias
Pleroma
.
User
alias
Pleroma
.
Web
.
OStatus
alias
Pleroma
.
Web
.
CommonAPI
...
...
test/web/oauth/authorization_test.exs
View file @
8bb7e19b
...
...
@@ -4,7 +4,8 @@
defmodule
Pleroma
.
Web
.
OAuth
.
AuthorizationTest
do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
OAuth
.
{
Authorization
,
App
}
alias
Pleroma
.
Web
.
OAuth
.
Authorization
alias
Pleroma
.
Web
.
OAuth
.
App
import
Pleroma
.
Factory
test
"create an authorization token for a valid app"
do
...
...
test/web/oauth/oauth_controller_test.exs
View file @
8bb7e19b
...
...
@@ -7,7 +7,8 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
import
Pleroma
.
Factory
alias
Pleroma
.
Repo
alias
Pleroma
.
Web
.
OAuth
.
{
Authorization
,
Token
}
alias
Pleroma
.
Web
.
OAuth
.
Authorization
alias
Pleroma
.
Web
.
OAuth
.
Token
test
"redirects with oauth authorization"
do
user
=
insert
(
:user
)
...
...
test/web/oauth/token_test.exs
View file @
8bb7e19b
...
...
@@ -4,7 +4,9 @@
defmodule
Pleroma
.
Web
.
OAuth
.
TokenTest
do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
OAuth
.
{
App
,
Token
,
Authorization
}
alias
Pleroma
.
Web
.
OAuth
.
App
alias
Pleroma
.
Web
.
OAuth
.
Authorization
alias
Pleroma
.
Web
.
OAuth
.
Token
alias
Pleroma
.
Repo
import
Pleroma
.
Factory
...
...
test/web/ostatus/activity_representer_test.exs
View file @
8bb7e19b
...
...
@@ -6,7 +6,9 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
OStatus
.
ActivityRepresenter
alias
Pleroma
.
{
User
,
Activity
,
Object
}
alias
Pleroma
.
Activity
alias
Pleroma
.
User
alias
Pleroma
.
Object
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
alias
Pleroma
.
Web
.
OStatus
...
...
test/web/ostatus/feed_representer_test.exs
View file @
8bb7e19b
...
...
@@ -6,7 +6,9 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do
use
Pleroma
.
DataCase
import
Pleroma
.
Factory
alias
Pleroma
.
User
alias
Pleroma
.
Web
.
OStatus
.
{
FeedRepresenter
,
UserRepresenter
,
ActivityRepresenter
}
alias
Pleroma
.
Web
.
OStatus
.
ActivityRepresenter
alias
Pleroma
.
Web
.
OStatus
.
FeedRepresenter
alias
Pleroma
.
Web
.
OStatus
.
UserRepresenter
alias
Pleroma
.
Web
.
OStatus
test
"returns a feed of the last 20 items of the user"
do
...
...
test/web/ostatus/incoming_documents/delete_handling_test.exs
View file @
8bb7e19b
...
...
@@ -4,7 +4,9 @@ defmodule Pleroma.Web.OStatus.DeleteHandlingTest do
import
Pleroma
.
Factory
import
Tesla
.
Mock
alias
Pleroma
.
{
Repo
,
Activity
,
Object
}
alias
Pleroma
.
Repo
alias
Pleroma
.
Activity
alias
Pleroma
.
Object
alias
Pleroma
.
Web
.
OStatus
setup
do
...
...
test/web/ostatus/ostatus_controller_test.exs
View file @
8bb7e19b
...
...
@@ -5,7 +5,9 @@
defmodule
Pleroma
.
Web
.
OStatus
.
OStatusControllerTest
do
use
Pleroma
.
Web
.
ConnCase
import
Pleroma
.
Factory
alias
Pleroma
.
{
User
,
Repo
,
Object
}
alias
Pleroma
.
User
alias
Pleroma
.
Repo
alias
Pleroma
.
Object
alias
Pleroma
.
Web
.
CommonAPI
alias
Pleroma
.
Web
.
OStatus
.
ActivityRepresenter
...
...
test/web/ostatus/ostatus_test.exs
View file @
8bb7e19b
...
...
@@ -6,7 +6,11 @@ defmodule Pleroma.Web.OStatusTest do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
OStatus
alias
Pleroma
.
Web
.
XML
alias
Pleroma
.
{
Object
,
Repo
,
User
,
Activity
,
Instances
}
alias
Pleroma
.
Object
alias
Pleroma
.
Repo
alias
Pleroma
.
User
alias
Pleroma
.
Activity
alias
Pleroma
.
Instances
import
Pleroma
.
Factory
import
ExUnit
.
CaptureLog
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment