humanmade/Custom-Meta-Boxes — pull request #262 by mattheu (2014-09-13 08:17:16+00:00)
Title: Fix show/hide logic and tests

Thinking a little more about the logic here: https://github.com/humanmade/Custom-Meta-Boxes/issues/257 - I don't think its quite right. Also - this seems perfect for unit tests.

Heres how I think it should work.
* If `show_on` is set, either `id` or `page-template`, then it should not show unless a match is found.
* This means that for a new post - they will always be hidden.
* Note - this is currently how it works as of the above PR.
* If `hide_on` is set, then it should show unless a match is found
* This means that for a new post - they will always be shown.

This PR fixes the hide on logic and adds unit tests for all show/hide methods.

cc @dashaluna