File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,8 +45,6 @@ class ActiveRecord_Relation < ActiveRecord::Relation
4545 include ContributesToPatientTeams ::Relation
4646 end
4747
48- UPLOAD_ONLY_YEAR_GROUPS = ( -2 ..13 ) . to_a . freeze
49-
5048 audited associated_with : :organisation
5149 has_associated_audits
5250
@@ -97,8 +95,6 @@ class ActiveRecord_Relation < ActiveRecord::Relation
9795 def to_param = workgroup
9896
9997 def year_groups ( academic_year : nil )
100- return UPLOAD_ONLY_YEAR_GROUPS if has_upload_only_access?
101-
10298 academic_year ||= AcademicYear . pending
10399 location_programme_year_groups
104100 . joins ( :location_year_group )
Original file line number Diff line number Diff line change 6464
6565 it_behaves_like "a model with a normalised email address"
6666 it_behaves_like "a model with a normalised phone number"
67-
68- describe "#year_groups" do
69- context "when team has upload_only access" do
70- let ( :team ) { create ( :team , type : :upload_only ) }
71-
72- it "covers nursery to upper sixth" do
73- expect ( team . year_groups ) . to eq ( ( -2 ..13 ) . to_a )
74- end
75-
76- it "ignores academic_year parameter" do
77- expect ( team . year_groups ( academic_year : 2024 ) ) . to eq ( ( -2 ..13 ) . to_a )
78- end
79- end
80- end
8167end
You can’t perform that action at this time.
0 commit comments