Files
project-work/worker-toolkit-stocks-in-the-future/repo/test/models/grade_book_test.rb
Eric Bell 2854619bc9 chore: init commit
in worker.../repo/GITFOLDER.zip is the .git folder.
2026-08-11 14:44:09 -04:00

28 lines
629 B
Ruby

# frozen_string_literal: true
# test/models/grade_book_test.rb
require "test_helper"
class GradeBookTest < ActiveSupport::TestCase
test "factory" do
assert build(:grade_book).validate!
end
test "default status is draft" do
book = create(:grade_book)
assert_equal "draft", book.status
assert_predicate book, :draft?
end
test "status enum transitions work" do
book = create(:grade_book)
book.verified!
assert_equal "verified", book.status
assert_predicate book, :verified?
book.completed!
assert_equal "completed", book.status
assert_predicate book, :completed?
end
end