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

Use DevHttpErrorHandler to check if play.editor link gets rendered #11306

Merged
merged 1 commit into from Jun 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -4,10 +4,8 @@

package play.it.views

import play.api.Configuration
import play.api.Environment
import play.api.Mode
import play.api.http.DefaultHttpErrorHandler
import play.api.http.DevHttpErrorHandler
import play.api.test._

class DevErrorPageSpec extends PlaySpecification {
Expand All @@ -20,8 +18,8 @@ class DevErrorPageSpec extends PlaySpecification {
}

"link the error line if play.editor is configured" in {
DefaultHttpErrorHandler.setPlayEditor("someEditorLinkWith %s:%s")
val result = DefaultHttpErrorHandler.onServerError(FakeRequest(), testExceptionSource)
DevHttpErrorHandler.setPlayEditor("someEditorLinkWith %s:%s")
val result = DevHttpErrorHandler.onServerError(FakeRequest(), testExceptionSource)
contentAsString(result) must contain("""href="someEditorLinkWith someSourceFile:100" """)
}

Expand Down