Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Fix normalization of attrs in Mirage config and tests #872

Merged
merged 1 commit into from Sep 28, 2017

Conversation

kevinansfield
Copy link
Collaborator

no issue

We weren't being consistent in our use of Mirage's normalizedRequestAttrs() method which meant that in certain cases Mirage's internal database had duplicated attrs, the original set being camelCase and the new/updated set being underscore_case which was not only confusing but can lead to errors or unexpected behaviour in tests.

  • updated Mirage config to always normalize where necessary
  • updated tests to always use camelCase attrs
  • added HEAD route handler for gravatar to avoid unknown route noise in tests

no issue

We weren't being consistent in our use of Mirage's `normalizedRequestAttrs()` method which meant that in certain cases Mirage's internal database had duplicated attrs, the original set being `camelCase` and the new/updated set being `underscore_case` which was not only confusing but can lead to errors or unexpected behaviour in tests.

- updated Mirage config to always normalize where necessary
- updated tests to always use `camelCase` attrs
- added `HEAD` route handler for gravatar to avoid unknown route noise in tests
@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.354% when pulling bd3b073 on kevinansfield:fix-mirage-attrs into 90706d0 on TryGhost:master.

@aileen aileen merged commit fb3dbbd into TryGhost:master Sep 28, 2017
@kevinansfield kevinansfield deleted the fix-mirage-attrs branch June 4, 2018 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants