Skip to content

Remove reject button, function, and tests#747

Open
jamiebenstead wants to merge 1 commit intomainfrom
1232-remove-reject-school-button-from-admin-console
Open

Remove reject button, function, and tests#747
jamiebenstead wants to merge 1 commit intomainfrom
1232-remove-reject-school-button-from-admin-console

Conversation

@jamiebenstead
Copy link
Contributor

Status

What's changed?

  • Removed the reject button from the admin console, along with the tests for it

Copilot AI review requested due to automatic review settings March 24, 2026 14:18
@cla-bot cla-bot bot added the cla-signed label Mar 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the “Reject School” capability from the Admin Schools UI by deleting the reject button, its controller action, and related admin feature specs, aligning the admin console behavior with the linked issue.

Changes:

  • Removed the “Reject School” button from the admin school show page.
  • Removed Admin::SchoolsController#reject and the associated admin feature specs.
  • Removed “reject school” i18n keys from the admin English locale file.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
spec/features/admin/schools_spec.rb Removes feature expectations and request specs tied to the reject action/link.
config/locales/admin/en.yml Removes i18n strings for reject action labels/flash messages.
app/views/admin/schools/show.html.erb Removes the “Reject School” action link from the admin UI.
app/controllers/admin/schools_controller.rb Removes the reject controller action implementation.
Comments suppressed due to low confidence (1)

app/controllers/admin/schools_controller.rb:20

  • The admin schools routes still define a patch :reject member route (config/routes.rb:18), but this PR removes Admin::SchoolsController#reject. Hitting that endpoint will now raise AbstractController::ActionNotFound. Either remove the reject route (and any remaining references/specs) or restore the controller action (even if it just returns 404) to keep routing consistent.
      redirect_to admin_school_path(requested_resource)
    end

    def reopen
      service = SchoolVerificationService.new(requested_resource)

      if service.reopen

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 36 to 41
expect(response.body).to include(I18n.t('administrate.actions.verify_school'))
end

it 'includes link to reject school' do
expect(response.body).to include(I18n.t('administrate.actions.reject_school'))
end

it 'does not include a link to search for this school by its ZIP code in the NCES public schools database' do
expect(response.body).not_to include('Search for this school in the NCES database')
end
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/title says the reject button/function/tests were removed, but there are still specs covering SchoolVerificationService#reject (spec/services/school_verification_service_spec.rb) and the service still delegates :reject. If the intent is to remove reject functionality entirely, those should be removed/updated; otherwise consider updating the PR description to clarify this is only removing the admin UI/controller reject behavior.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Test coverage

89.57% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/23494272182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants