-
-
Save kingsleyh/7170d5de30671047fbce14498a1e488b to your computer and use it in GitHub Desktop.
crystal types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = repo.user.findByEmail(user.value["email"]) | |
p typeof(result.value) #(Iterator::Stop | RethinkDB::QueryResult | String) | |
p result.value.is_a?(RethinkDB::QueryResult) #true | |
result.should be_a(DB::Success(RethinkDB::QueryResult)) # fails with error below | |
Failures: | |
1) Repository Repository::User should find a user by email | |
Failure/Error: result.should be_a(DB::Success(RethinkDB::QueryResult)) | |
Expected DB::Success(Iterator::Stop | RethinkDB::QueryResult)(@value={"activeChannel" => {}, "channels" => [], "email" => "test3@test.com", "groups" => [], "id" => "4667082c-f378-4e02-86bf-b985dbf68584", "name" => "test3", "password" => "password3"}) (DB::Success(Iterator::Stop | RethinkDB::QueryResult)) to be a DB::Success(RethinkDB::QueryResult) | |
# spec/repository_spec.cr:47 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment