swt2-intro-exercise / rails-exercise-18-lassesteffen

rails-exercise-18-lassesteffen created by GitHub Classroom
MIT License
0 stars 0 forks source link

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

Closed swt2public closed 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-28 20:45:15", updated_at: "2018-10-28 20:45:15">] actual collection contained: [#<author id: 1, first_name: "alan", last_name: "turing", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-28 20:45:15", updated_at: "2018-10-28 20:45:15">] the missing elements were: [#<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-28 20:45:15", updated_at: "2018-10-28 20:45:15">]

Estimated progress: 95% complete

swt2public commented 5 years ago

Sorry, it's not working for me yet:

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

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-28 20:45:30", updated_at: "2018-10-28 20:45:30">] actual collection contained: [#<author id: 1, first_name: "alan", last_name: "turing", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-28 20:45:30", updated_at: "2018-10-28 20:45:30">] the missing elements were: [#<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2018-10-28 20:45:30", updated_at: "2018-10-28 20:45:30">]

If you have problems solving this task, please don't hesitate to contact the teaching team!