Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Https code school url validation #509

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

garyray-k
Copy link
Contributor

Description of changes

Small change to the Makefile with comments that can help anyone debugging to output verbose tests or test just one when running make test

Updated the code_school.rb model to have URL validation for HTTPS. Uses Regex to accomplish this.
Added a test to ensure that it will throw an error when a HTTP address is given.
Updated the Code School Factory Faker for URL to generate HTTPS urls for mock data in testing

Issue Resolved

Fixes #436

as: :json

errors = JSON.parse(response.body)['errors']
assert errors.include? 'Url must be HTTPS, if unable please secure your site'
Copy link
Member

Choose a reason for hiding this comment

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

👏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you have to have HTTPS for a .dev domain (https://get.dev/#benefits), any coding school worth their salt should have it by default. Would be interested to hear use cases where it's HTTP, but I can't think of a reason to not have it nowadays.

@garyray-k garyray-k closed this May 4, 2019
@garyray-k garyray-k reopened this May 4, 2019
@garyray-k
Copy link
Contributor Author

Whoops. Didn't mean to close the un-merged PR... 😕

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing protocol scheme on code schools
2 participants