Skip to content

Commit

Permalink
Make providers all selectable_school in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
inulty-dfe committed Aug 29, 2024
1 parent 5998efd commit 37e68da
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def given_i_am_signed_out
end

def and_the_course_i_selected_only_has_one_site
@course = create(:course, :open, name: 'Potions')
@course = create(:course, :open, name: 'Potions', provider: create(:provider, selectable_school: true))
@site = create(:site, provider: @course.provider)
create(:course_option, site: @site, course: @course)
end
Expand Down Expand Up @@ -151,6 +151,7 @@ def given_the_course_i_selected_has_multiple_sites
:course,
:open,
:with_both_study_modes,
provider: create(:provider, selectable_school: true),
name: 'Herbology',
)
@site1 = create(:site, provider: @course_with_multiple_sites.provider)
Expand Down Expand Up @@ -198,7 +199,7 @@ def and_i_see_a_link_to_the_course_on_find
private

def application_choice_for_candidate(candidate:, application_choice_count:)
provider = create(:provider)
provider = create(:provider, selectable_school: true)
application_form = create(:application_form, candidate:)
application_choice_count.times { course_option_for_provider(provider:) }
provider.courses.each do |course|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

def given_there_is_a_provider_with_a_course_that_is_only_accepting_applications_on_apply
@provider = create(:provider, code: '8N5', name: 'Snape University')
@provider = create(:provider, code: '8N5', name: 'Snape University', selectable_school: true)
@course = create(:course, :open, name: 'Potions', provider: @provider)
first_site = create(
:site,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
end

def given_there_is_a_provider_with_a_course_that_is_only_accepting_applications_on_apply
@provider = create(:provider, name: 'Vim masters')
@provider = create(:provider, name: 'Vim masters', selectable_school: true)

@first_site = create(:site, provider: @provider, name: 'Site 1')
@second_site = create(:site, provider: @provider, name: 'Site 2')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def given_i_am_signed_in
end

def and_there_is_a_course_with_one_course_option
@provider = create(:provider)
@provider = create(:provider, selectable_school: true)
create(:course, :open, name: 'English', provider: @provider, study_mode: :full_time)

course_option_for_provider(provider: @provider, course: @provider.courses.first)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def given_i_am_signed_in
end

def and_there_are_course_options
@provider = create(:provider, name: 'University of Alien Dance')
@provider = create(:provider, name: 'University of Alien Dance', selectable_school: true)

@first_site = create(:site, provider: @provider, name: 'Site 1')
@second_site = create(:site, provider: @provider, name: 'Site 2')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def application_choice
end

def and_there_are_course_options
@provider = create(:provider, name: 'Gorse SCITT', code: '1N1')
@provider = create(:provider, name: 'Gorse SCITT', code: '1N1', selectable_school: true)
first_site = create(
:site,
name: 'Main site',
Expand Down

0 comments on commit 37e68da

Please sign in to comment.