projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/mrf-simple-welcome-chats' into 'develop'
[akkoma]
/
test
/
tasks
/
frontend_test.exs
diff --git
a/test/tasks/frontend_test.exs
b/test/tasks/frontend_test.exs
index 6a9a931eb5d36889a13c4507c1e13e3ee87603de..022ae51be1a7cb8864906889b26c5b39a782417e 100644
(file)
--- a/
test/tasks/frontend_test.exs
+++ b/
test/tasks/frontend_test.exs
@@
-24,13
+24,12
@@
defmodule Pleroma.FrontendTest do
"pleroma" => %{
"ref" => "fantasy",
"name" => "pleroma",
"pleroma" => %{
"ref" => "fantasy",
"name" => "pleroma",
- "build_url" => "http://gensokyo.2hu/builds/${ref}",
- "build_dir" => ""
+ "build_url" => "http://gensokyo.2hu/builds/${ref}"
}
})
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)
capture_io(fn ->
end)
capture_io(fn ->
@@
-49,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 ->
Frontend.run(["install", "pleroma", "--file", "test/fixtures/tesla_mock/frontend.zip"])
end)
capture_io(fn ->
Frontend.run(["install", "pleroma", "--file", "test/fixtures/tesla_mock/frontend.zip"])
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
test "it downloads and unzips unknown frontends" do
end
test "it downloads and unzips unknown frontends" do