chore: cleaned up bang-Operator usage

This commit is contained in:
2026-05-01 16:56:21 +02:00
parent 7f5077c6ad
commit a95e9482a7
13 changed files with 459 additions and 266 deletions

View File

@@ -458,6 +458,17 @@ defmodule BDS.PostsTest do
assert post.published_at == 1_036_497_600_000
end
test "rebuild_posts_from_files returns an error for unreadable post files", %{project: project} do
posts_dir = Path.join([BDS.Projects.project_data_dir(project), "posts", "2026", "04"])
File.mkdir_p!(posts_dir)
file_path = Path.join(posts_dir, "unreadable.md")
File.mkdir_p!(file_path)
assert {:error, {:read_rebuild_file, ^file_path, :eisdir}} =
BDS.Posts.rebuild_posts_from_files(project.id)
end
test "rebuild_posts_from_files parses folded multiline title and slug scalars alongside translations" do
temp_dir =
Path.join(System.tmp_dir!(), "bds-post-rebuild-folded-#{System.unique_integer([:positive])}")