Skip to content

Commit

Permalink
[#21] try to make the acceptance test pass, now fail two lines after,…
Browse files Browse the repository at this point in the history
… still not use always valid authentication
  • Loading branch information
Vincent Doba committed Oct 18, 2014
1 parent 12ab89e commit 329b173
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/ApplicationSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ApplicationSpec extends PlaySpecification {
}

"render the invoice form page" in new WithApplication(app) {
val creds1 = cookies(route(FakeRequest(POST, "/authenticate/naive").withTextBody("user")).get)
val creds1 = cookies(route(FakeRequest(POST, "/auth/authenticate/test").withTextBody("user")).get)

val home = route(FakeRequest(GET, "/").withCookies(creds1.get("id").get)).get

Expand Down
6 changes: 3 additions & 3 deletions test/securesocial/testkit/AlwaysValidIdentityProvider.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import securesocial.core.AuthenticationResult.Authenticated
import scala.concurrent.ExecutionContext.Implicits.global

class AlwaysValidIdentityProvider(app:play.api.Application) extends IdentityProvider with Plugin {
def authMethod: AuthenticationMethod = AuthenticationMethod("naive")
def authMethod: AuthenticationMethod = AuthenticationMethod("test")


override def authenticate()(implicit request: Request[play.api.mvc.AnyContent]): Future[AuthenticationResult] ={
Future(Authenticated(BasicProfile("google", id, Some("jean"), Some("test"), Some("jean test"),Some("jean.test@example.com"),None, authMethod,None, None, None)))
Future(Authenticated(BasicProfile("google", id, Some("jean"), Some("test"), Some("jean test"),Some("jean.test@lateral-thoughts.com"),None, authMethod,None, None, None)))
}

val id: String = "naive"
val id: String = "test"
}

0 comments on commit 329b173

Please sign in to comment.