プロジェクト

全般

プロフィール

« | » 

リビジョン 78128799

高徹 高橋 徹 さんが約6年前に追加

[phase-17]Make unit test for GlossaryTerm, add test for GlossaryCategory

差分を表示:

test/unit/glossary_term_test.rb
require File.expand_path('../../test_helper', __FILE__)
class GlossaryTermTest < ActiveSupport::TestCase
fixtures :glossary_terms
plugin_fixtures :glossary_terms
# Replace this with your real tests.
def test_truth
assert true
def setup
@term = glossary_terms('red')
end
def test_valid
assert @term.valid?
end
def test_invalid_without_name
@term.name = nil
assert_raises ActiveRecord::NotNullViolation do
@term.save
end
end
end

他の形式にエクスポート: Unified diff