Skip to content

Conversation

@dev28237582
Copy link
Collaborator

Introduce best practice tooling such as RSpec and FactoryBot in order to clean up and make test suite more reliable and easier to extend.

@dev28237582 dev28237582 self-assigned this Feb 18, 2021
@dev28237582 dev28237582 changed the title Refresh Test Infrastructure and Expand Coverage to all Specified/Required Behaviours Refresh Test Infrastructure and Expand Coverage to all Specified/Required Behaviours (which currently exist) Feb 18, 2021
@@ -0,0 +1,66 @@
require 'rails_helper'

RSpec.describe Node do
Copy link
Collaborator Author

@dev28237582 dev28237582 Feb 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reload is used everywhere in here because n_children, n_descendants, etc. are calculated by a database trigger (on insert only) - we need to find some way to dirty track these attributes more elegantly than asking a user to reload the model directly every time - a sure path to inconsistent behaviour and bugs.

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.

2 participants