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

Add tests to OffencesController #2368

Open
colinbruce opened this issue May 15, 2018 · 0 comments
Open

Add tests to OffencesController #2368

colinbruce opened this issue May 15, 2018 · 0 comments

Comments

@colinbruce
Copy link
Contributor

Something like

  let(:params) { { fee_scheme: 'fee_reform', description: 'Offence 1', band_id: 1, category_id: 1, format: :json} }

  it do
    should permit(:fee_scheme, :description, :search_offence, :category_id, :band_id).for(:index, params: params, verb: :get)
  end

But this introduces more Deprecation warnings due to shoulda matchers see closed PR chain

Updating Gemfile to use shoulda-matchers master branch then breaks association tests e.g.

  1) Fee::FixedFee should belong to fee_type optional: true
     Failure/Error: it { should belong_to(:fee_type) }
       Expected Fee::FixedFee to have a belongs_to association called fee_type (the association should have been defined with `optional: true`, but was not)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant