conductor_test.exs 664 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
defmodule ConductorTest do

  use ExUnit.Case, async: true

  alias Grengine.{Conductor, PerformanceSupervisor}

  describe "finding all performances" do

    setup do
      PerformanceSupervisor.start_link
      PerformanceSupervisor.start_performance("foo")
      PerformanceSupervisor.start_performance("bar")
      :ok

    end

    test "get all running performances" do
      foo = Conductor.get_performances()
      assert is_list(foo)
      assert length(foo) == 2
      # assert [{:n, :l, {:performance, "foo"}}] == foo
    end

    test "handle single performance" do
      values = Conductor.perform()
      assert is_list(values)
    end

  end



end