defmodule <%= application_module %>.ConnCase do
  @moduledoc """
  This module defines the test case to be used by
  tests that require setting up a connection.

  Such tests rely on `Phoenix.ConnTest` and also
  imports other functionalities to make it easier
  to build and query models.

  Finally, if the test case interacts with the database,
  it cannot be async. For this reason, every test runs
  inside a transaction which is reset at the beginning
  of the test unless the test case is marked as async.
  """

  use ExUnit.CaseTemplate

  using do
    quote do
      # Import conveniences for testing with connections
      use Phoenix.ConnTest
<%= if ecto do %>
      # Alias the data repository and import query/model functions
      alias <%= application_module %>.Repo
      import Ecto.Model
      import Ecto.Query, only: [from: 2]
<% end %>
      # Import URL helpers from the router
      import <%= application_module %>.Router.Helpers

      # The default endpoint for testing
      @endpoint <%= application_module %>.Endpoint
    end
  end

  setup tags do
<%= if ecto do %>    unless tags[:async] do
      Ecto.Adapters.SQL.restart_test_transaction(<%= application_module %>.Repo, [])
    end
<% end %>
    :ok
  end
end

defmodule <%= application_module %>.ConnCase do
  @moduledoc """
  This module defines the test case to be used by
  tests that require setting up a connection.

  Such tests rely on `Phoenix.ConnTest` and also
  imports other functionality to make it easier
  to build and query models.

  Finally, if the test case interacts with the database,
  it cannot be async. For this reason, every test runs
  inside a transaction which is reset at the beginning
  of the test unless the test case is marked as async.
  """

  use ExUnit.CaseTemplate

  using do
    quote do
      # Import conveniences for testing with connections
      use Phoenix.ConnTest
<%= if ecto do %>
      # Alias the data repository and import query/model functions
      alias <%= application_module %>.Repo
      import Ecto.Model
      import Ecto.Query, only: [from: 2]
<% end %>
      # Import URL helpers from the router
      import <%= application_module %>.Router.Helpers

      # The default endpoint for testing
      @endpoint <%= application_module %>.Endpoint
    end
  end

  setup tags do
<%= if ecto do %>    unless tags[:async] do
      Ecto.Adapters.SQL.restart_test_transaction(<%= application_module %>.Repo, [])
    end
<% end %>
    :ok
  end
end

Fix word usage in `ConnCase` docs.
Fix word usage in `ConnCase` docs.

Functionality is already plural.
gjaldon/phoenix,0x00evil/phoenix,evax/phoenix,Joe-noh/phoenix,mobileoverlord/phoenix,bsmr-erlang/phoenix,nshafer/phoenix,lono-devices/phoenix,bsodmike/phoenix,Rumel/phoenix,kyledecot/phoenix,milafrerichs/phoenix,phoenixframework/phoenix,JHKennedy4/phoenix,manukall/phoenix,michalmuskala/phoenix,ephe-meral/phoenix,trarbr/phoenix,CD1212/phoenix,Dahoon/phoenix,foxnewsnetwork/phoenix,beni55/phoenix,FND/phoenix,0x00evil/phoenix,maxnordlund/phoenix,doron2402/phoenix,pap/phoenix,evax/phoenix,hsavit1/phoenix,sadiqmmm/phoenix,ugisozols/phoenix,wicliff/phoenix,doomspork/phoenix,nshafer/phoenix,scrogson/phoenix,optikfluffel/phoenix,rodrigues/phoenix,Ben-Evolently/phoenix,mschae/phoenix,optikfluffel/phoenix,kevinold/phoenix,henrik/phoenix,mitchellhenke/phoenix,iguberman/phoenix,bsmr-erlang/phoenix,omotenko/phoenix_auth,michalmuskala/phoenix,sdnorm/phoenix,keathley/phoenix,Kosmas/phoenix,seejee/phoenix,phoenixframework/phoenix,optikfluffel/phoenix,Smulligan85/phoenix,rafbgarcia/phoenix,eksperimental/phoenix,nicrioux/phoenix,ericmj/phoenix,safi/phoenix,vic/phoenix,CultivateHQ/phoenix,manukall/phoenix,keathley/phoenix,kidaa/phoenix,javimolla/phoenix,GabrielNicolasAvellaneda/phoenix,Fluxuous/phoenix,seejee/phoenix,DavidAlphaFox/phoenix,ybur-yug/phoenix,romul/phoenix,Gazler/phoenix,justnoxx/phoenix,korobkov/phoenix,yonglehou/phoenix,stevedomin/phoenix,thegrubbsian/phoenix,trarbr/phoenix,kholbekj/phoenix,cas27/phoenix,dmarkow/phoenix,jamilabreu/phoenix,ephe-meral/phoenix,Smulligan85/phoenix,dmarkow/phoenix,mschae/phoenix,DavidAlphaFox/phoenix,hotvulcan/phoenix,bdtomlin/phoenix,yoavlt/phoenix,robomc/phoenix,stefania11/phoenix,gjaldon/phoenix,daytonn/phoenix,mvidaurre/phoenix,jeffweiss/phoenix,Eventacular/phoenix,iStefo/phoenix,marcioj/phoenix,iStefo/phoenix,vic/phoenix,pap/phoenix,ahmetabdi/phoenix,elliotcm/phoenix,jasond-s/phoenix,rodrigues/phoenix,cas27/phoenix,0x00evil/phoenix,nickgartmann/phoenix,lancehalvorsen/phoenix,andrewvy/phoenix,andrewvy/phoenix,Kosmas/phoenix,y-yagi/phoenix,Gazler/phoenix,mobileoverlord/phoenix,greyhwndz/phoenix,linearregression/phoenix,lono-devices/phoenix,tony612/phoenix,jeffkreeftmeijer/phoenix,jxs/phoenix,mitchellhenke/phoenix,arthurcolle/phoenix,begleynk/phoenix,CultivateHQ/phoenix,jamilabreu/phoenix,rafbgarcia/phoenix,stevedomin/phoenix,wsmoak/phoenix,jwarwick/phoenix,nshafer/phoenix,switchflip/phoenix,eksperimental/phoenix,rafbgarcia/phoenix,SmartCasual/phoenix,Joe-noh/phoenix,ericmj/phoenix,omotenko/phoenix_auth,StevenNunez/phoenix,paulcsmith/phoenix,fbjork/phoenix,mvidaurre/phoenix,robhurring/phoenix,ybur-yug/phoenix,lancehalvorsen/phoenix,KazuCocoa/phoenix,phoenixframework/phoenix,jwarwick/phoenix,VictorZeng/phoenix,brucify/phoenix,korobkov/phoenix,esbullington/phoenix-1,wsmoak/phoenix,Rumel/phoenix