Skip to content

Commit

Permalink
Merge pull request #9907 from DFE-Digital/2496-fix-wrong-qualificatio…
Browse files Browse the repository at this point in the history
…n-row-on-provider-interface-for-tda-applications

Show the right data when seeing undergraduate courses in provider interface
  • Loading branch information
tomas-stefano authored Oct 11, 2024
2 parents 34759ae + 8079408 commit 27526d2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/helpers/qualification_value_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module QualificationValueHelper
def qualification_text(course_option)
return if course_option.course.qualifications.nil?

course_option.course.qualifications.map(&:upcase).join(' with ')
if course_option.course.undergraduate?
course_option.course.description
else
course_option.course.qualifications.map(&:upcase).join(' with ')
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,23 @@ def row_text_selector(row_name, render)
expect(render_text).to include('Funding type')
expect(render_text).to include('Fee')
end

context 'when undergraduate application' do
let(:course) do
build(
:course,
:teacher_degree_apprenticeship,
name: 'Geograpghy',
code: 'H234',
provider:,
)
end

it 'renders the undergraduate course qualification' do
render_text = row_text_selector(:qualification, render)

expect(render_text).to include('Qualification')
expect(render_text).to include('Teacher degree apprenticeship with QTS')
end
end
end

0 comments on commit 27526d2

Please sign in to comment.