Issue #1811622 by tim.plunkett, xjm: Remove assumption about front page title from NodeCreationTest.
Part of #1811016: [meta] Decouple tests from Node module.
NodeCreationTest
currently assumes the title of the node front page is "Welcome to Drupal," and uses this to test whether the user is redirected away from the node page when an unpublished node is created. It also does not actually confirm that that the node is created.
Attached is based on @tim.plunkett's change in the VDC sandbox. Tim had removed the configuration that sets node
as the front page and just changed the title assertion as in the attached. However, if we really do want to codify that the user is directed to the front page, and not just away from the node page, we should check the URL. Unfortunately, because of the way user_page()
works, we can't just assertUrl('')
when user
is the front page, because it redirects to user/N
and so fails any generic assertion I was able to come up with. So, I've left node
as the front page here.
Comment | File | Size | Author |
---|---|---|---|
#3 | drupal-1811622-3.patch | 1.27 KB | tim.plunkett |
node-creation-test.patch | 1.33 KB | xjm | |
Comments
Comment #1
xjmComment #1.0
xjmUpdated issue summary.
Comment #2
tim.plunkettI helped write this patch, so I won't RTBC. But +1!
Comment #3
tim.plunkettRemoving the debug statement.
Comment #4
cosmicdreams CreditAttribution: cosmicdreams commentedLooks good and the previous patch went green
Comment #5
xjmMaybe a better solution: #1811804: Provide a test page testing module
Comment #6
xjmYeah, closing in favor of #1811804: Provide a test page testing module; I really think that's a better direction.
Comment #6.0
xjmUpdated issue summary.