Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Failure/Error: expect(image_series.errors.messages).to include(visit: ['The visits patient is different from this image series\' patient'])
- expected #<ActiveModel::DeprecationHandlingMessageHash({:visit => #<ActiveModel::DeprecationHandlingMessageArray(["The visits patient is different from this image series' patient"])>})> to include {:visit => ["The visits patient is different from this image series' patient"]}
- Diff:
- @@ -1 +1 @@
- -:visit => ["The visits patient is different from this image series' patient"],
- +{:visit=>["The visits patient is different from this image series' patient"]}
- # ./spec/models/image_series_spec.rb:189:in `block (2 levels) in <main>'
- # ./spec/spec_helper.rb:276:in `block (3 levels) in <top (required)>'
- # /usr/local/bundle/gems/database_cleaner-core-2.0.1/lib/database_cleaner/strategy.rb:30:in `cleaning'
- # /usr/local/bundle/gems/database_cleaner-core-2.0.1/lib/database_cleaner/cleaners.rb:34:in `block (2 levels) in cleaning'
- # /usr/local/bundle/gems/database_cleaner-core-2.0.1/lib/database_cleaner/cleaners.rb:35:in `cleaning'
- # ./spec/spec_helper.rb:275:in `block (2 levels) in <top (required)>'
- # /usr/local/bundle/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
- i solved the above error by reading up and following ideas from the links below
- * https://api.rubyonrails.org/classes/ActiveModel/Errors.html.
- * https://code.lulalala.com/2020/0531-1013.html.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement