Mix Task Frontend test: Expand.

This commit is contained in:
lain 2020-08-07 16:03:06 +02:00
parent de00a4c0f1
commit 50d5bdfd31
4 changed files with 4 additions and 3 deletions

View File

@ -0,0 +1 @@
this is a text file

Binary file not shown.

1
test/fixtures/test.txt vendored Normal file
View File

@ -0,0 +1 @@
this is a text file

View File

@ -24,13 +24,12 @@ test "it downloads and unzips a known frontend" do
"pleroma" => %{ "pleroma" => %{
"ref" => "fantasy", "ref" => "fantasy",
"name" => "pleroma", "name" => "pleroma",
"build_url" => "http://gensokyo.2hu/builds/${ref}", "build_url" => "http://gensokyo.2hu/builds/${ref}"
"build_dir" => ""
} }
}) })
Tesla.Mock.mock(fn %{url: "http://gensokyo.2hu/builds/fantasy"} -> Tesla.Mock.mock(fn %{url: "http://gensokyo.2hu/builds/fantasy"} ->
%Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/frontend.zip")} %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/frontend_dist.zip")}
end) end)
capture_io(fn -> capture_io(fn ->