Remove split, use excerpt block
This commit is contained in:
parent
aaa72e2186
commit
0858c7b6d5
10 changed files with 36 additions and 12 deletions
|
@ -8,13 +8,15 @@ tags:
|
|||
date: 2017-05-05
|
||||
draft: true
|
||||
---
|
||||
{% block excerpt %}
|
||||
Recently, I reviewed [a patch][1] in the [Override Node Options][2] module issue queue. For those not familiar with it, the module adds extra permissions for node options like "authored by" and "published on" which are normally only available to users with the `administer nodes` permission. What the patch does is to optionally add another set of permissions that enable options for all content types - e.g. "override published option for all node types", in addition to or instead of the content type specific ones.
|
||||
|
||||
It was quite an old issue and the latest patch needed to be re-rolled due to merge conflicts, but the existing tests still passed. Though as no new tests were added for the new functionality, these needed to be added before I committed it.
|
||||
|
||||
This post documents the steps that I took to update the tests to add the proposed functionality.
|
||||
<!-- split -->
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
## Reviewing the Existing Tests
|
||||
|
||||
The first thing to do was to run the existing tests and check that they still passed. I do this on the command line by typing `php scripts/run-tests.sh --class OverrideNodeOptionsTestCase`.
|
||||
|
@ -195,6 +197,7 @@ Test run duration: 25 sec
|
|||
<img src="/assets/images/blog/override-node-options-refactor-tests-new-passing.png" alt="">
|
||||
|
||||
[Here][3] are my full changes from the previous patch, where I added the new tests as well as some small refactors.
|
||||
{% endblock %}
|
||||
|
||||
[1]: https://www.drupal.org/node/974730
|
||||
[2]: https://www.drupal.org/project/override_node_options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue