Add test to guard against unused colours

This commit is contained in:
Alhadis
2016-10-05 16:14:33 +11:00
parent e38cc75da5
commit 20b8188384
2 changed files with 8 additions and 1 deletions

View File

@@ -494,4 +494,11 @@ class TestLanguage < Minitest::Test
message << missing.sort.join("\n")
assert missing.empty?, message
end
def test_no_unused_colours
Language.all.each do |language|
next unless language.type == :data || language.type == :prose
assert !language.color, "Unused colour assigned to #{language.name}"
end
end
end