diff options
| author | Maxim Filippov <colixer@gmail.com> | 2019-10-18 18:35:58 +0200 | 
|---|---|---|
| committer | Maxim Filippov <colixer@gmail.com> | 2019-10-18 18:35:58 +0200 | 
| commit | 019147f1153f0df844997c04c31753c18a22509f (patch) | |
| tree | 4086ddbb3c92cd0439a973ec6f59bb2c0c758c4c /test/support | |
| parent | 2473702be22a44070fcff439ac901f5b9bb0586a (diff) | |
| parent | 4053a82f41691195d1b29cc9eb3f6ed6814ee12f (diff) | |
| download | pleroma-019147f1153f0df844997c04c31753c18a22509f.tar.gz pleroma-019147f1153f0df844997c04c31753c18a22509f.zip  | |
Merge branch 'develop' into feature/relay-list
Diffstat (limited to 'test/support')
| -rw-r--r-- | test/support/factory.ex | 20 | ||||
| -rw-r--r-- | test/support/http_request_mock.ex | 10 | 
2 files changed, 9 insertions, 21 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex index b180844cd..0fdb1e952 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -281,26 +281,6 @@ defmodule Pleroma.Factory do      }    end -  def websub_subscription_factory do -    %Pleroma.Web.Websub.WebsubServerSubscription{ -      topic: "http://example.org", -      callback: "http://example.org/callback", -      secret: "here's a secret", -      valid_until: NaiveDateTime.add(NaiveDateTime.utc_now(), 100), -      state: "requested" -    } -  end - -  def websub_client_subscription_factory do -    %Pleroma.Web.Websub.WebsubClientSubscription{ -      topic: "http://example.org", -      secret: "here's a secret", -      valid_until: nil, -      state: "requested", -      subscribers: [] -    } -  end -    def oauth_app_factory do      %Pleroma.Web.OAuth.App{        client_name: "Some client", diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 4feb57f3a..7d65209fb 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -38,6 +38,14 @@ defmodule HttpRequestMock do       }}    end +  def get("https://shitposter.club/users/moonman", _, _, _) do +    {:ok, +     %Tesla.Env{ +       status: 200, +       body: File.read!("test/fixtures/tesla_mock/moonman@shitposter.club.json") +     }} +  end +    def get("https://mastodon.social/users/emelie/statuses/101849165031453009", _, _, _) do      {:ok,       %Tesla.Env{ @@ -620,7 +628,7 @@ defmodule HttpRequestMock do      {:ok,       %Tesla.Env{         status: 200, -       body: File.read!("test/fixtures/tesla_mock/https___shitposter.club_notice_2827873.html") +       body: File.read!("test/fixtures/tesla_mock/https___shitposter.club_notice_2827873.json")       }}    end  | 
