progress bar logic
This commit is contained in:
@ -56,4 +56,25 @@ class QuizStatusTest < ActiveSupport::TestCase
|
||||
|
||||
assert status.can_submit
|
||||
end
|
||||
|
||||
test "richard is at 100%" do
|
||||
richard = candidates :richard
|
||||
status = QuizStatus.new richard
|
||||
|
||||
assert_equal 100, status.progress
|
||||
end
|
||||
|
||||
test "roy is 20% done" do
|
||||
roy = candidates :roy
|
||||
status = QuizStatus.new roy
|
||||
|
||||
assert_equal 20, status.progress
|
||||
end
|
||||
|
||||
test "martha is 0% done" do
|
||||
martha = candidates :martha
|
||||
status = QuizStatus.new martha
|
||||
|
||||
assert_equal 0, status.progress
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user