This commit is contained in:
@ -18,7 +18,7 @@ defmodule MemexWeb.ContextLiveTest do
|
||||
}
|
||||
@invalid_attrs %{
|
||||
"content" => nil,
|
||||
"tags_string" => "",
|
||||
"tags_string" => " ",
|
||||
"slug" => nil,
|
||||
"visibility" => nil
|
||||
}
|
||||
@ -114,9 +114,13 @@ defmodule MemexWeb.ContextLiveTest do
|
||||
|
||||
assert_patch(show_live, Routes.context_show_path(conn, :edit, context.slug))
|
||||
|
||||
assert show_live
|
||||
|> form("#context-form", context: @invalid_attrs)
|
||||
|> render_change() =~ "can't be blank"
|
||||
html =
|
||||
show_live
|
||||
|> form("#context-form", context: @invalid_attrs)
|
||||
|> render_change()
|
||||
|
||||
assert html =~ "can't be blank"
|
||||
assert html =~ "tags must be comma-delimited"
|
||||
|
||||
{:ok, _, html} =
|
||||
show_live
|
||||
|
@ -19,7 +19,7 @@ defmodule MemexWeb.NoteLiveTest do
|
||||
}
|
||||
@invalid_attrs %{
|
||||
"content" => nil,
|
||||
"tags_string" => "",
|
||||
"tags_string" => " ",
|
||||
"slug" => nil,
|
||||
"visibility" => nil
|
||||
}
|
||||
@ -54,9 +54,13 @@ defmodule MemexWeb.NoteLiveTest do
|
||||
|
||||
assert_patch(index_live, Routes.note_index_path(conn, :new))
|
||||
|
||||
assert index_live
|
||||
|> form("#note-form", note: @invalid_attrs)
|
||||
|> render_change() =~ "can't be blank"
|
||||
html =
|
||||
index_live
|
||||
|> form("#note-form", note: @invalid_attrs)
|
||||
|> render_change()
|
||||
|
||||
assert html =~ "can't be blank"
|
||||
assert html =~ "tags must be comma-delimited"
|
||||
|
||||
{:ok, _, html} =
|
||||
index_live
|
||||
|
@ -17,7 +17,7 @@ defmodule MemexWeb.PipelineLiveTest do
|
||||
}
|
||||
@invalid_attrs %{
|
||||
"description" => nil,
|
||||
"tags_string" => "",
|
||||
"tags_string" => " ",
|
||||
"slug" => nil,
|
||||
"visibility" => nil
|
||||
}
|
||||
@ -128,9 +128,13 @@ defmodule MemexWeb.PipelineLiveTest do
|
||||
|
||||
assert_patch(show_live, Routes.pipeline_show_path(conn, :edit, pipeline.slug))
|
||||
|
||||
assert show_live
|
||||
|> form("#pipeline-form", pipeline: @invalid_attrs)
|
||||
|> render_change() =~ "can't be blank"
|
||||
html =
|
||||
show_live
|
||||
|> form("#pipeline-form", pipeline: @invalid_attrs)
|
||||
|> render_change()
|
||||
|
||||
assert html =~ "can't be blank"
|
||||
assert html =~ "tags must be comma-delimited"
|
||||
|
||||
{:ok, _, html} =
|
||||
show_live
|
||||
|
@ -22,6 +22,6 @@ defmodule Memex.ContextsFixtures do
|
||||
})
|
||||
|> Contexts.create_context(user)
|
||||
|
||||
context
|
||||
%{context | tags_string: nil}
|
||||
end
|
||||
end
|
||||
|
@ -22,6 +22,6 @@ defmodule Memex.NotesFixtures do
|
||||
})
|
||||
|> Notes.create_note(user)
|
||||
|
||||
note
|
||||
%{note | tags_string: nil}
|
||||
end
|
||||
end
|
||||
|
@ -22,6 +22,6 @@ defmodule Memex.PipelinesFixtures do
|
||||
})
|
||||
|> Pipelines.create_pipeline(user)
|
||||
|
||||
pipeline
|
||||
%{pipeline | tags_string: nil}
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user