I'm also an Elixir newb. I'm trying to use this inside of a test case in Phoenix, but I'm getting the same error as @rosscdh. It seems like no matter where I put the require and/or import, the error is the same. My code in the test is:
defmodule Jiranomohub.OrganizationApiControllerTest do
use Jiranomohub.ConnCase
alias Poison.Encoder
alias Jiranomohub.Organization
I'm also an Elixir newb. I'm trying to use this inside of a test case in Phoenix, but I'm getting the same error as @rosscdh. It seems like no matter where I put the require and/or import, the error is the same. My code in the test is:
defmodule Jiranomohub.OrganizationApiControllerTest do
use Jiranomohub.ConnCase
alias Poison.Encoder
alias Jiranomohub.Organization
require Poison.Encoder
import Poison.Encoder
@validattrs %{domain: "test.com", email: "est.tester@test.com"} #, lastused: Ecto.DateTime.utc, uniquecode: Ecto.UUID.generate(), isactive: :true }
@invalid_attrs %{domain: "", email: ""}
setup do
conn = conn()
{:ok, conn: conn}
end
test "/api call gets organization", %{conn: conn} do
end
end