diff --git a/test/mihainator/extractor_test.exs b/test/mihainator/extractor_test.exs new file mode 100644 index 0000000..50cbe2c --- /dev/null +++ b/test/mihainator/extractor_test.exs @@ -0,0 +1,31 @@ +defmodule Mihainator.ExtractorTest do + @moduledoc false + + use ExUnit.Case, async: true + + alias Mihainator.Extractor + + @test_file Path.join([File.cwd!(), "data", "test.csv"]) + + test "should get a full year of sorted months" do + expected = [ + "2021-12", + "2022-01", + "2022-02", + "2022-03", + "2022-04", + "2022-05", + "2022-06", + "2022-07", + "2022-08", + "2022-09", + "2022-10", + "2022-11", + "2022-12" + ] + + result = Extractor.extract(@test_file) + + assert Map.keys(result) == expected + end +end diff --git a/test/mihainator_web/controllers/page_controller_test.exs b/test/mihainator_web/controllers/page_controller_test.exs deleted file mode 100644 index 005e5ef..0000000 --- a/test/mihainator_web/controllers/page_controller_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule MihainatorWeb.PageControllerTest do - use MihainatorWeb.ConnCase - - test "GET /", %{conn: conn} do - conn = get(conn, ~p"/") - assert html_response(conn, 200) =~ "Peace of mind from prototype to production" - end -end