swt2-intro-exercise / rails-exercise-19-leonschmidt99

rails-exercise-19-leonschmidt99 created by GitHub Classroom
MIT License
0 stars 0 forks source link

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

Closed swt2public closed 4 years ago

swt2public commented 4 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 author information that is passed by the new select element to save the changes. 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: "2019-10-31 20:25:40", updated_at: "2019-10-31 20:25:40">] actual collection contained: [#<author id: 1, first_name: "alan", last_name: "turing", homepage: "http://wikipedia.de/alan_turing", created_at: "2019-10-31 20:25:40", updated_at: "2019-10-31 20:25:40">] the missing elements were: [#<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2019-10-31 20:25:40", updated_at: "2019-10-31 20:25:40">]

42/44 exercise tests have passed