Skip to content

Commit

Permalink
Add further spec for funding eligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockyy committed Dec 2, 2022
1 parent d4739dc commit f90a0f5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/services/npq/funding_eligibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,29 @@
end
end

context "when previously funded for a different course" do
let(:trn) { application.teacher_reference_number }
let(:application) do
create(
:npq_application,
eligible_for_funding: true,
teacher_reference_number_verified: true,
)
end
let(:npq_application_course) { application.npq_course }
# Making sure they are completely separate courses
let(:npq_course) { create(:npq_course, identifier: npq_application_course.identifier.reverse) }

before do
NPQ::Application::Accept.new(npq_application: application).call
end

it "returns truthy" do
expect(subject.call[:previously_funded]).to be_falsey
expect(subject.call[:previously_received_targeted_funding_support]).to be_falsey
end
end

context "when previously funded with targeted delivery funding" do
let(:trn) { application.teacher_reference_number }
let(:application) do
Expand Down

0 comments on commit f90a0f5

Please sign in to comment.