diff options
| author | lain <lain@soykaf.club> | 2020-09-03 11:40:17 +0200 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-09-03 11:40:17 +0200 | 
| commit | 5da367760748f7c4534b84dcb9286d715110472e (patch) | |
| tree | bd5062f8c6fb760bf86de8944f549d9ad8e91c49 /test | |
| parent | f26b580e80e57f162442e6f0c3bc0072cb935ce3 (diff) | |
| download | pleroma-5da367760748f7c4534b84dcb9286d715110472e.tar.gz pleroma-5da367760748f7c4534b84dcb9286d715110472e.zip | |
Frontend mix task: Add tests.
Diffstat (limited to 'test')
| -rw-r--r-- | test/tasks/frontend_test.exs | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/test/tasks/frontend_test.exs b/test/tasks/frontend_test.exs index 0ca2b9a28..022ae51be 100644 --- a/test/tasks/frontend_test.exs +++ b/test/tasks/frontend_test.exs @@ -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 ->        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 | 
