Skip to content

Commit e3d57d2

Browse files
committed
fix failing tests (BREAKING Changes!!) #97
1 parent d001cf6 commit e3d57d2

10 files changed

Lines changed: 14 additions & 12 deletions

File tree

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# is restricted to this project.
66

77
# General application configuration
8-
import Mix.Config
8+
import Config
99

1010
# Configures the endpoint
1111
config :app, AppWeb.Endpoint,

config/dev.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Mix.Config
1+
import Config
22

33
# For development, we disable any cache and enable
44
# debugging and code reloading.

config/prod.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Mix.Config
1+
import Config
22

33
# For production, don't forget to configure the url host
44
# to something meaningful, Phoenix uses this information

config/prod.secret.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# from environment variables. You can also hardcode secrets,
33
# although such is generally not recommended and you have to
44
# remember to add this file to your .gitignore.
5-
import Mix.Config
5+
import Config
66

77
secret_key_base =
88
System.get_env("SECRET_KEY_BASE") ||

config/test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Mix.Config
1+
import Config
22

33
# We don't run a server during test. If one is required,
44
# you can enable the server option below.
@@ -7,7 +7,7 @@ config :app, AppWeb.Endpoint,
77
server: false
88

99
# Print only warnings and errors during test
10-
config :logger, level: :warn
10+
config :logger, level: :warning
1111

1212
config :auth_plug,
1313
httpoison_mock: true

lib/app_web.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ defmodule AppWeb do
3737
import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1]
3838

3939
# Use all HTML functionality (forms, tags, etc)
40-
use Phoenix.HTML
40+
import Phoenix.HTML
41+
import Phoenix.HTML.Form
42+
use PhoenixHTMLHelpers
4143

4244
import AppWeb.ErrorHelpers
4345
import AppWeb.Gettext

lib/app_web/templates/layout/app.html.eex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
</section>
3838
</header>
3939
<main role="main" class="container">
40-
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
41-
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
4240
<%= @inner_content %>
4341
</main>
4442
<script type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>

lib/app_web/views/error_helpers.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defmodule AppWeb.ErrorHelpers do
22
@moduledoc """
33
Conveniences for translating and building error messages.
44
"""
5-
6-
use Phoenix.HTML
5+
import Phoenix.HTML.Form
6+
use PhoenixHTMLHelpers
77

88
@doc """
99
Generates tag for inlined form input errors.

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule App.MixProject do
77
version: "1.4.7",
88
elixir: "~> 1.12",
99
elixirc_paths: elixirc_paths(Mix.env()),
10-
compilers: Mix.compilers(),
10+
compilers: [:yecc] ++ Mix.compilers(),
1111
start_permanent: Mix.env() == :prod,
1212
aliases: aliases(),
1313
deps: deps(),
@@ -38,6 +38,7 @@ defmodule App.MixProject do
3838
{:phoenix, "~> 1.7.7"},
3939
{:phoenix_pubsub, "~> 2.1.1"},
4040
{:phoenix_html, "~> 4.1"},
41+
{:phoenix_html_helpers, "~> 1.0"},
4142
{:phoenix_live_reload, "~> 1.3", only: :dev},
4243
{:gettext, "~> 0.20"},
4344
{:jason, "~> 1.4"},

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
2323
"phoenix": {:hex, :phoenix, "1.7.11", "1d88fc6b05ab0c735b250932c4e6e33bfa1c186f76dcf623d8dd52f07d6379c7", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "b1ec57f2e40316b306708fe59b92a16b9f6f4bf50ccfa41aa8c7feb79e0ec02a"},
2424
"phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"},
25+
"phoenix_html_helpers": {:hex, :phoenix_html_helpers, "1.0.1", "7eed85c52eff80a179391036931791ee5d2f713d76a81d0d2c6ebafe1e11e5ec", [:mix], [{:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "cffd2385d1fa4f78b04432df69ab8da63dc5cf63e07b713a4dcf36a3740e3090"},
2526
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.5.2", "354460993a480656b71c3887f5565f612b3bdbdd8688c83f9e6f512307067dd4", [:mix], [{:file_system, "~> 0.3 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "2bb3722f327e14a7aa47b1acf27ed633c8cd27b167e18b8237954b9b4804af39"},
2627
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
2728
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},

0 commit comments

Comments
 (0)