Skip to content

Refresh Test Infrastructure and Expand Coverage to all Specified/Required Behaviours (which currently exist)#32

Draft
dev28237582 wants to merge 8 commits into
devfrom
test-infra-refresh
Draft

Refresh Test Infrastructure and Expand Coverage to all Specified/Required Behaviours (which currently exist)#32
dev28237582 wants to merge 8 commits into
devfrom
test-infra-refresh

Conversation

@dev28237582

Copy link
Copy Markdown
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
Comment thread spec/models/node_spec.rb
@@ -0,0 +1,66 @@
require 'rails_helper'

RSpec.describe Node do

@dev28237582 dev28237582 Feb 18, 2021

Copy link
Copy Markdown
Collaborator Author

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.

1 participant