punchcard-cms / punchcard

The Punchcard CMS
Apache License 2.0
31 stars 19 forks source link

Core Dev: Approval routing E2E refactor #220

Open scottnath opened 8 years ago

scottnath commented 8 years ago

The test file, server.js, in punchcard tests is causing a great deal of issues. We need to remove all testing which does anything more than check the existence and viability of the routes.

Feature: Approval routing unit testing
  As a core developer
  I want to create unit tests for all non-routing code in the approval routing
  So that our code is confirmed by direct unit testing

  Scenario: Discover uncovered lines
    Given that the routing is being tested as E2E instead of the code being unit testing
     When I remove the /content routes from server.js
     Then I should have a clear indication of which lines need to be covered via unit testing

  Scenario: Refactor uncovered lines
    Given that some code can be broken out of routes
     When I move code to other files
     Then I should create new tests to cover that moved code.

Unit Testing

scottnath commented 8 years ago

Reopening. Needs a much deeper dive

scottnath commented 8 years ago

Continued refactor is blocked by the need for a testing database option: https://github.com/punchcard-cms/punchcard/issues/283