2018-04-30 15:28:18 +02:00
|
|
|
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
|
|
|
|
class GlossaryTermTest < ActiveSupport::TestCase
|
2018-08-09 13:27:46 +02:00
|
|
|
fixtures :glossary_terms
|
|
|
|
plugin_fixtures :glossary_terms
|
2018-04-30 15:28:18 +02:00
|
|
|
|
2018-08-09 13:27:46 +02:00
|
|
|
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
|
2018-04-30 15:28:18 +02:00
|
|
|
end
|
|
|
|
end
|