From be2a93525069de2dfa3c23b0c23e7a9f7ad4c03d Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 29 Dec 2024 15:14:43 +0100 Subject: First commit. --- test/models/scoring_criterium_test.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/models/scoring_criterium_test.rb (limited to 'test/models/scoring_criterium_test.rb') 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 -- cgit v1.2.3