a11yist/test/models/element_test.rb
david 21ab02d647
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s
Links, mainly...
2024-07-26 00:59:00 +02:00

24 lines
627 B
Ruby

require 'test_helper'
class ElementTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
test 'level calculation' do
skip
sc1 = success_criteria(:one)
sc2 = success_criteria(:two)
sc3 = success_criteria(:one)
sc4 = success_criteria(:two)
sc5 = success_criteria(:one)
sc6 = success_criteria(:two)
element = elements(:one)
element.success_criteria = [sc1, sc2, sc3, sc4, sc5, sc6]
element.success_criteria.each { _1.passed! }
assert element.level == :A
element.success_criteria.each { _1.result = :passed }
assert element.level == 'A'
end
end