Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GovukContentSecurityPolicy test #324

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Fix GovukContentSecurityPolicy test #324

merged 1 commit into from
Oct 5, 2023

Commits on Oct 5, 2023

  1. Fix GovukContentSecurityPolicy test

    The test started failing because Rails now prevents meaningless assignments to
    a configuration key by raising NoMethodError.  See:
    rails/rails@265bfad
    
    ```
      GovukContentSecurityPolicy.configure creates a policy
         Failure/Error: Rails.application.config.content_security_policy = nil
    
         NoMethodError:
           Cannot assign to `content_security_policy`, it is a configuration method
    
                       raise NoMethodError.new("Cannot assign to `#{key}`, it is a configuration method")
                       ^^^^^
         # ./spec/lib/govuk_content_security_policy_spec.rb:14:in `block (3 levels) in <top (required)>'
    ```
    AgaDufrat committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    6c709b2 View commit details
    Browse the repository at this point in the history