11defmodule FunWithFlags.UI.RouterTest do
22 use ExUnit.Case , async: false
3- use Plug.Test
3+ import Plug.Test
4+ import Plug.Conn
45 import FunWithFlags.UI.TestUtils
56
67 alias FunWithFlags.UI.Router
@@ -112,7 +113,7 @@ defmodule FunWithFlags.UI.RouterTest do
112113 describe "DELETE /flags/:name/boolean" do
113114 test "when the flag exists, it deletes its boolean gate and redirects to the flag page" do
114115 { :ok , true } = FunWithFlags . enable :frozen_yogurt
115- { :ok , true } = FunWithFlags . enable :frozen_yogurt , for_group: "some_group"
116+ { :ok , true } = FunWithFlags . enable :frozen_yogurt , for_group: "some_group"
116117
117118 assert % Flag { name: :frozen_yogurt , gates: [ % Gate { type: :boolean } , % Gate { type: :group } ] } = FunWithFlags . get_flag ( :frozen_yogurt )
118119
@@ -128,7 +129,7 @@ defmodule FunWithFlags.UI.RouterTest do
128129 describe "DELETE /flags/:name/percentage" do
129130 test "when the flag exists, it deletes its current percentage gate and redirects to the flag page" do
130131 { :ok , true } = FunWithFlags . enable :pizza , for_percentage_of: { :time , 0.5 }
131- { :ok , true } = FunWithFlags . enable :pizza , for_group: "some_group"
132+ { :ok , true } = FunWithFlags . enable :pizza , for_group: "some_group"
132133
133134 assert % Flag { name: :pizza , gates: [ % Gate { type: :percentage_of_time , for: 0.5 } , % Gate { type: :group } ] } = FunWithFlags . get_flag ( :pizza )
134135
0 commit comments