Skip to content

Conversation

@notapatch
Copy link
Contributor

@notapatch notapatch commented Oct 4, 2019

I'll wait on @yihyang pull request #1069 - by eye I haven't seen any merge conflict but I want to keep things easy.


  • using subject(:chapter) where possible

  • trying is_expected.to it can automatically be changed by
    Rubocop

  • validating all attributes as required on model

  • slug is an on save test - explicit save! and reload before
    testing again

  • scope tests only need one object of each type and see if it
    is allowed or denied

  • mystery

    • available_to_user
    • not sure if we need a URL safe slug or not but it isn't
      being enforced

And, coverall, like one word in production code removed. I'm hoping for at least +0.001% increase in coverage fingers crossed

 - using subject(:chapter) where possible
 - trying is_expected.to it can automatically be changed by
   Rubocop
 - validating all attributes as required on model
 - slug is an on save test - explicit save! and reload before
   testing again
 - scope tests only need one object of each type and see if it
   is allowed or denied

 - mystery
   - method available_to_user
   - not sure if we need a URL safe slug or not but it isn't
     being enforced
@notapatch notapatch changed the title chapter with basic layer of testing [WIP] chapter with basic layer of testing Oct 4, 2019
@notapatch
Copy link
Contributor Author

The refactoring of tests can wait.

@notapatch notapatch closed this Nov 13, 2019
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

Successfully merging this pull request may close these issues.

1 participant