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

Refactored hardcoded v0.1 url tests to test all supported versions #9945

Merged
merged 2 commits into from Oct 4, 2018

Conversation

rishabhgrg
Copy link
Contributor

refs #9866

  • Added test util method for api path based on version
  • Updated all hardcoded v0.1 tests strings to use dynamic string from util method
  • Updated hardcoded v0.1 tests using regex match to use string equal with new util method

refs TryGhost#9866

- used in unit tests to compare url created based on version
Copy link
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

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

Feel free to self merge 👍


urlService.utils
.urlFor('api', {version: apiVersion, versionType: 'content'}, true)
.should.eql(`https://something.de${testUtils.API.getApiPath({version: apiVersion, versionType: 'content'})}`);

This comment was marked as abuse.

This comment was marked as abuse.

return `${baseAPIPath}v0.1/`;
}
}

This comment was marked as abuse.

…s with new test util

refs TryGhost#9866

- Updated all hardcoded v0.1 tests strings to use dynamic string from util method
- Updated hardcoded v0.1 tests using regex match to use string equal with new util method
@rishabhgrg rishabhgrg merged commit f78d9d3 into TryGhost:master Oct 4, 2018
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

3 participants