logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

hashtag_test.exs (482B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.HashtagTest do
  5. use Pleroma.DataCase
  6. alias Pleroma.Hashtag
  7. describe "changeset validations" do
  8. test "ensure non-blank :name" do
  9. changeset = Hashtag.changeset(%Hashtag{}, %{name: ""})
  10. assert {:name, {"can't be blank", [validation: :required]}} in changeset.errors
  11. end
  12. end
  13. end