diff options
Diffstat (limited to 'test/models/scoring_criterium_test.rb')
-rw-r--r-- | test/models/scoring_criterium_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/models/scoring_criterium_test.rb b/test/models/scoring_criterium_test.rb new file mode 100644 index 0000000..754e876 --- /dev/null +++ b/test/models/scoring_criterium_test.rb @@ -0,0 +1,21 @@ +require "test_helper" + +class ScoringCriteriumTest < ActiveSupport::TestCase + def setup + @scoring_criterium = scoring_criteria(:one) + end + + test "should be valid with valid attributes" do + assert @scoring_criterium.valid? + end + + test "should have category" do + @scoring_criterium.category = nil + assert_not @scoring_criterium.valid?, "Scoring Criterium has no category." + end + + test "should have name" do + @scoring_criterium.name = nil + assert_not @scoring_criterium.valid?, "Scoring Criterium has no name." + end +end |