Skip to content

Wrong params when PUT #update in generated controller spec from scaffold #2590

Closed
@taketo1113

Description

@taketo1113

What Ruby, Rails and RSpec versions are you using?

Ruby version: 3.1.1
Rails version: 7.0.2.3
RSpec version: 3.11

Observed behaviour

I seems that it should use new_attributes insted of valid_attributes when PUT #update with valid params.

https://github.com/rspec/rspec-rails/blob/main/lib/generators/rspec/scaffold/templates/controller_spec.rb#L122

Expected behaviour

Use new_attributes when PUT #update with valid params in generated controller spec from scaffold.

Can you provide an example app?

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions