lundi 6 février 2017

Accessing params in tests

I am trying to test that when I have query parameters, I return the correct content based on that parameter.

I have tried:

test "find_tags returns tips with the correct tag type" do
  post = fixture(:post)
  tip = Post |> Post.find_tags("tag", "connect"}) |> Repo.all
  assert String.contains? tip.content, "#connect"
end

but I get an error. I am uncertain if this is the correct way to access the parameters, or if there is anything else that I'm missing.

Aucun commentaire:

Enregistrer un commentaire