Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LEVWEB-1173] Test full marriage details #389

Merged
merged 13 commits into from
Jan 7, 2019

Conversation

RobinKnipe
Copy link
Contributor

Adds a bunch of tests: unit, functional, acceptance... plus some [much needed] refactoring.
See individual commits for details...

Chimp, the acceptance testing module, has split into 2 versions:
 - `chimpy` the actively maintained old `chimp`
 - `chimp 2.0` a pipedream that doesn't exist
...with the other header inspection help.
...to explicitly check for the absence of fields from the full marriage view.
...to work correctly handle mixed case headers names - so not just `x-auth-username`, but `X-Auth-Username` now works too.
...for the `full-details` header that shows the complete marriage record.
test/unit/lib/req-info.js Outdated Show resolved Hide resolved
test/unit/lib/req-info.js Show resolved Hide resolved
controllers/marriage-details.js Outdated Show resolved Hide resolved
test/unit/controllers/marriage-details.js Outdated Show resolved Hide resolved
test/acceptance/spec/22-marriage-details.js Outdated Show resolved Hide resolved
test/acceptance/mixins/search.js Show resolved Hide resolved
test/acceptance/expected-marriage-record.js Show resolved Hide resolved
Providing an object that does not match the request info type object (i.e. a non-object, or one that does not contain the request info) will cause an error.
Copy link
Contributor

@daniel-ac-martin daniel-ac-martin left a comment

Choose a reason for hiding this comment

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

Regarding the extra function, I don't think it really needs to be unit tested in isolation. It doesn't form part of the contract that that module makes with other modules and is only called in one place so unintended software regressions aren't an issue. I would just test it as a part of the main function but I'm not massively fussed.

lib/req-info.js Show resolved Hide resolved
test/acceptance/mixins/search.js Show resolved Hide resolved
...to be more generic (so that it now works with general headers as well as roles), and make funciton names a bit more descriptive.
@daniel-ac-martin daniel-ac-martin merged commit eb67777 into master Jan 7, 2019
@daniel-ac-martin daniel-ac-martin deleted the levweb-1173_test-full-marriage-details branch January 7, 2019 19:20
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.

None yet

2 participants