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

Add a validation for the movie's imdbId #10

Merged
merged 1 commit into from
May 17, 2016

Conversation

jpgdev
Copy link
Contributor

@jpgdev jpgdev commented May 17, 2016

There was a missing validation to get a movie's imdbId. It was only checking if there was an anchor with a href attribute, but not if the href attribute contained 'imdb'. So if there was no imdb anchor, the regex was still called, but on an undefined value.

Update the tests movies to work, since the movies in the tests are no longer in theaters (may need to find a permanent solution).

Added 2 tests to test the 2 validations : theathers not found & movie not found.

There was a missing validation to get a movie's imdbId. It was only checking if there was an anchor with a href attribute, but not if the href attribute contained 'imdb'. So if there was no imdb anchor, the regex was still called, but on an undefined value.

Update the tests movies to work, since the movies in the tests are no longer in theaters (may need to find a permanent solution).

Added 2 tests to test the 2 validations : theathers not found & movie not found.
@coveralls
Copy link

Coverage Status

Coverage increased (+2.5%) to 100.0% when pulling 20e76d3 on jpgdev:fix_validation into 79725c4 on anault:master.

@alexnault alexnault merged commit 53a391d into alexnault:master May 17, 2016
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.

None yet

3 participants