This commit is contained in:
2025-11-07 13:34:32 -08:00
commit 1e8c5a972b
436 changed files with 11000 additions and 0 deletions

16
test/models/book_test.rb Normal file
View File

@@ -0,0 +1,16 @@
require "test_helper"
class BookTest < ActiveSupport::TestCase
test "slug is generated from title" do
book = Book.create!(title: "Hello, World!")
assert_equal "hello-world", book.slug
end
test "press a leafable" do
leaf = books(:manual).press Page.new(body: "Important words"), title: "Introduction"
assert leaf.page?
assert_equal "Important words", leaf.page.body.content.to_s
assert_equal "Introduction", leaf.title
end
end