skill-assessment-app/test/integration/question_flow_test.rb

38 lines
937 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
require 'test_helper'
class QuestionFlowTest < ActionDispatch::IntegrationTest
test "should load the first question" do
2016-09-14 17:05:37 -05:00
auth_candidate candidates(:martha)
get question_path
assert_response :success
assert_select '.question-text', questions(:fed1).question
end
test "should load the summary" do
2016-09-14 17:05:37 -05:00
auth_candidate candidates(:dawn)
get summary_path
assert_response :success
assert_select '.prft-heading', 'Almost done!'
end
test "can load specific question from summary" do
2016-09-14 17:05:37 -05:00
auth_candidate candidates(:dawn)
question = questions(:fed4)
get question_path(question.id)
assert_response :success
assert_select '.question-text', question.question
end
test 'juan should be on summary with 80% complete' do
2016-09-14 17:05:37 -05:00
auth_candidate candidates(:juan)
get summary_path
assert_response :success
assert_select '.progress span', '80%'
end
end