tolerate spaces in tags

This commit is contained in:
2023-11-04 22:07:25 -04:00
parent 1d6ba5960c
commit d5e334dc09
10 changed files with 40 additions and 39 deletions

View File

@ -17,7 +17,7 @@ defmodule MemexWeb.ContextLiveTest do
}
@invalid_attrs %{
content: nil,
tags_string: "invalid tags",
tags_string: "invalid_tag or_tags",
slug: nil,
visibility: nil
}
@ -114,7 +114,7 @@ defmodule MemexWeb.ContextLiveTest do
|> render_change(context: @invalid_attrs)
assert html =~ "can't be blank"
assert html =~ "tags must be comma-delimited"
assert html =~ "tags must be comma or space delimited"
{:ok, _live, html} =
show_live

View File

@ -17,7 +17,7 @@ defmodule MemexWeb.NoteLiveTest do
}
@invalid_attrs %{
content: nil,
tags_string: "invalid tags",
tags_string: "invalid_tag or_tags",
slug: nil,
visibility: nil
}
@ -55,7 +55,7 @@ defmodule MemexWeb.NoteLiveTest do
|> render_change(note: @invalid_attrs)
assert html =~ "can't be blank"
assert html =~ "tags must be comma-delimited"
assert html =~ "tags must be comma or space delimited"
{:ok, _live, html} =
index_live

View File

@ -17,7 +17,7 @@ defmodule MemexWeb.PipelineLiveTest do
}
@invalid_attrs %{
description: nil,
tags_string: "invalid tags",
tags_string: "invalid_tag or_tags",
slug: nil,
visibility: nil
}
@ -130,7 +130,7 @@ defmodule MemexWeb.PipelineLiveTest do
|> render_change(pipeline: @invalid_attrs)
assert html =~ "can't be blank"
assert html =~ "tags must be comma-delimited"
assert html =~ "tags must be comma or space delimited"
{:ok, _live, html} =
show_live