Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
swt2public opened this issue Nov 7, 2017 · 0 comments
Open

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

swt2public opened this issue Nov 7, 2017 · 0 comments

Comments

@swt2public
Copy link

Scenario

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

Hints

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 #<activerecord::associations::collectionproxy [#<author id: 1, first_name: "alan", last_name: "turing.../wikipedia.org/alan_turing", created_at: "2017-11-07 14:05:16", updated_at: "2017-11-07 14:05:16">]> to include #<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2017-11-07 14:05:16", updated_at: "2017-11-07 14:05:16">
diff:
@@ -1,2 +1,8 @@
-[#<author id: 2, first_name: "peter", last_name: "plagiarist", homepage: "http://wikipedia.de/alan_turing", created_at: "2017-11-07 14:05:16", updated_at: "2017-11-07 14:05:16">]
+[#<author:0x00000006c2fe10

  • id: 1,
  • first_name: "alan",
  • last_name: "turing",
  • homepage: "http://wikipedia.org/alan_turing",
  • created_at: tue, 07 nov 2017 14:05:16 utc +00:00,
  • updated_at: tue, 07 nov 2017 14:05:16 utc +00:00>]

Estimated progress: 94% complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant