mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
working on displaying data
This commit is contained in:
parent
8c389742ee
commit
74ff33d74e
11 changed files with 204 additions and 9 deletions
|
|
@ -35,7 +35,13 @@ RSpec.describe SchoolCategory, type: :model do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'sync_responses' do
|
||||
describe 'answer_index_average' do
|
||||
it 'should provide the average answer_index for all responses' do
|
||||
expect(school_category1.answer_index_average).to eq(15.0/4.0)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'sync_aggregated_responses' do
|
||||
|
||||
let!(:category3) { Category.create!(name: 'Category 3', parent_category: category1) }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@ require 'rails_helper'
|
|||
|
||||
RSpec.describe "schools/show", type: :view do
|
||||
before(:each) do
|
||||
@school_categories = []
|
||||
@school = assign(:school, School.create!(
|
||||
:name => "Name",
|
||||
:district_id => 2
|
||||
:name => "School",
|
||||
:district => District.create(name: 'District')
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
expect(rendered).to match(/Name/)
|
||||
expect(rendered).to match(/2/)
|
||||
expect(rendered).to match(/School/)
|
||||
expect(rendered).to match(/District/)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue