mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 11:19:19 +00:00
Frontend mix task: Add tests.
This commit is contained in:
parent
f26b580e80
commit
5da3677607
1 changed files with 8 additions and 1 deletions
|
@ -48,11 +48,18 @@ defmodule Pleroma.FrontendTest do
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
folder = Path.join([@dir, "frontends", "pleroma", "fantasy"])
|
||||||
|
previously_existing = Path.join([folder, "temp"])
|
||||||
|
File.mkdir_p!(folder)
|
||||||
|
File.write!(previously_existing, "yey")
|
||||||
|
assert File.exists?(previously_existing)
|
||||||
|
|
||||||
capture_io(fn ->
|
capture_io(fn ->
|
||||||
Frontend.run(["install", "pleroma", "--file", "test/fixtures/tesla_mock/frontend.zip"])
|
Frontend.run(["install", "pleroma", "--file", "test/fixtures/tesla_mock/frontend.zip"])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
assert File.exists?(Path.join([@dir, "frontends", "pleroma", "fantasy", "test.txt"]))
|
assert File.exists?(Path.join([folder, "test.txt"]))
|
||||||
|
refute File.exists?(previously_existing)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it downloads and unzips unknown frontends" do
|
test "it downloads and unzips unknown frontends" do
|
||||||
|
|
Loading…
Reference in a new issue