2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-08-07 09:36:08 -05:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class QuestionLiveCoderTest < ActionDispatch::IntegrationTest
|
|
|
|
test "can load a live coder question" do
|
2016-09-14 17:05:37 -05:00
|
|
|
auth_candidate candidates(:dawn)
|
2016-08-07 09:36:08 -05:00
|
|
|
question = questions(:fed7)
|
|
|
|
|
|
|
|
get question_path(question.id)
|
|
|
|
assert_response :success
|
2017-03-20 10:57:50 -05:00
|
|
|
assert_select 'div', question.question
|
2016-08-07 09:36:08 -05:00
|
|
|
end
|
2016-08-23 21:54:53 -05:00
|
|
|
|
|
|
|
test "should load seed data into live coder" do
|
2016-09-14 17:05:37 -05:00
|
|
|
auth_candidate candidates(:juan)
|
2016-08-23 21:54:53 -05:00
|
|
|
question = questions(:fed7)
|
|
|
|
|
|
|
|
get question_path(question.id)
|
|
|
|
assert_response :success
|
2016-09-02 17:51:35 -05:00
|
|
|
assert_select '#answer_answer_hash_html', question.input_options['html']
|
2016-08-23 21:54:53 -05:00
|
|
|
end
|
2016-08-07 09:36:08 -05:00
|
|
|
end
|