Skip to content

tests for scaffold.Document#86

Open
jnievelt wants to merge 1 commit into
twitter:masterfrom
jnievelt:document-tests
Open

tests for scaffold.Document#86
jnievelt wants to merge 1 commit into
twitter:masterfrom
jnievelt:document-tests

Conversation

@jnievelt

Copy link
Copy Markdown

Also closing some HTML elements in main.html to make it XML parseable for testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than explicitly doing flatMap and map, you can do this a bit more idiomatically using for-expressions:

for {
  head <- xml.child find { _.label == "head" }
  title <- head.child find { _.label == "title" }
} yield title.text

And probably shouldn't do the getOrElse "", to avoid masking errors in the tests.

@CLAassistant

CLAassistant commented Jul 29, 2019

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Joe Nievelt seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants