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

Commit

Permalink
Resolve a minor issue in expectation from Spec to Api
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjswift committed Apr 11, 2011
1 parent 10c8f49 commit bdac03f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -166,7 +166,7 @@ public ApiResponse<Credentials> login(final String email, final String password)
if (response.status == HttpStatus.SC_OK) {
result = new ApiResponse<Credentials>(response.status, new Credentials(response.payload, email), response.headers);
} else {
result = new ApiResponse<Credentials>(response.status, null, response.headers);
result = new ApiResponse<Credentials>(response.status, new Credentials(null, email, password), response.headers);
}
return result;
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/scala/SimplenoteApiSpec.scala
Expand Up @@ -27,7 +27,8 @@ class SimplenoteApiSpec extends WordSpec with ShouldMatchers {
val response = unauthorized.login(badCredentials.email, badCredentials.password)
response.status should not be (HttpStatus.SC_UNAUTHORIZED)
response.payload.email should be (badCredentials.email)
response.payload.password should be (null)
response.payload.password should be (badCredentials.password)
response.payload should be (badCredentials)
}
}

Expand Down

0 comments on commit bdac03f

Please sign in to comment.