You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/spec/views/legacy/question_lists/new.html.erb_spec.rb

26 lines
791 B

require 'rails_helper'
module Legacy
RSpec.describe 'legacy/question_lists/new', type: :view do
before(:each) do
assign(:question_list, QuestionList.new(
name: 'MyString',
description: 'MyText',
question_ids: 'MyText'
))
end
it 'renders new question_list form' do
render
assert_select 'form[action=?][method=?]', legacy_question_lists_path, 'post' do
assert_select 'input#question_list_name[name=?]', 'question_list[name]'
assert_select 'textarea#question_list_description[name=?]', 'question_list[description]'
assert_select 'input[name=?]', 'question_list[question_id_array][]'
end
end
end
end