 
   use ExUnit.Case, async: true
 
+  alias HELL.TestHelper.Random
   alias Helix.Account.Controller.AccountSetting, as: AccountSettingController
-  alias Helix.Account.Model.AccountSetting
   alias Helix.Account.Model.Setting
   alias Helix.Account.Repo
 

  end

  describe "fetching every setting" do
    test "includes modified settings" do
      account = Factory.insert(:account)

      default_settings =
        Setting
        |> Repo.all()
        |> format_settings()

      expected_settings =
        Setting
        |> Repo.all()
        |> format_settings(fn {setting_id, _} ->
          %{setting_value: value} = Factory.params_for(:account_setting)
          {setting_id, value}
        end)

      Enum.each(expected_settings, fn {setting, value} ->
        AccountSettingController.put(account, setting, value)
      end)

      received_settings =
        account
        |> AccountSettingController.get_settings()
        |> format_settings()

      assert expected_settings == received_settings
      refute received_settings == default_settings
    end

    test "includes unchanged settings" do
      account = Factory.insert(:account)

      account_settings =
        account
        |> AccountSettingController.get_settings()
        |> format_settings()

      default_settings =
        Setting
        |> Repo.all()
        |> format_settings()

      assert account_settings == default_settings
    end

    if Repo.all(Setting) == [],
      do: Factory.insert_list(3, :setting)
    :ok
  end

  describe "changing specific settings" do
