sqm-dashboards/spec/views/legacy/question_lists/index.html.erb_spec.rb
Nelson Jovel ad03606d66 Add benchmarks to survey and admin data items. Remove them from measures. Modify seeder
Calculate benchmarks for measures based on a weighted average of survey
and admin data items

Added architectural records
2021-12-28 14:10:34 +01:00

28 lines
857 B
Ruby

require 'rails_helper'
module Legacy
RSpec.describe 'legacy/question_lists/index', type: :view do
before(:each) do
assign(:question_lists, [
QuestionList.create!(
name: 'Name',
description: 'MyText',
question_ids: '1,2,3'
),
QuestionList.create!(
name: 'Name',
description: 'MyText',
question_ids: '2,3,4'
)
])
end
it 'renders a list of question_lists' do
render(template: 'legacy/question_lists/index')
assert_select 'tr>td', text: 'Name'.to_s, count: 2
assert_select 'tr>td', text: 'MyText'.to_s, count: 2
assert_select 'tr>td', text: '1,2,3'.to_s, count: 1
assert_select 'tr>td', text: '2,3,4'.to_s, count: 1
end
end
end