swt2-intro-exercise / rails-exercise-18-Kenneth-Schroeder

rails-exercise-18-Kenneth-Schroeder created by GitHub Classroom
MIT License
1 stars 0 forks source link

Edit paper page should save changes to the author list #19

Open swt2public opened 5 years ago

swt2public commented 5 years ago

Scenario

Given a paper with one author And another author called 'Peter Plagiarist' When a user visits the paper's edit page And then selects 'Peter Plagiarist' as author And submits the form Then 'Peter Plagiarist' and 'Alan Turing' should be authors of the paper

Hints

The paper controller must be able to deal with the additional information that is passed by the new select. Make sure that you have "permitted" the parameters for passing the author ids to the paper controller (function paper_params) using :author_ids => [].

Error

Expected collection contained: [#<author id: 1, first_name: "alan", last_name: "turing", homepage: "http://wikipedia.de/alan_turing"...://wikipedia.de/alan_turing", created_at: "2018-10-30 22:27:46", updated_at: "2018-10-30 22:27:46">] actual collection contained: [#<author id: 1, first_name: "alan", last_name: "turing", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-30 22:27:46", updated_at: "2018-10-30 22:27:46">] the missing elements were: [#<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-30 22:27:46", updated_at: "2018-10-30 22:27:46">]

Estimated progress: 95% complete