Skip to content

Commit

Permalink
Just another test #99
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Aug 24, 2016
1 parent e66e963 commit 38baa9e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Source/RethinkDb.Driver.Tests/ReQL/JObjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,21 @@ public void try_getting_an_object_that_doesnt_exist()
var result = table.Get(Guid.NewGuid()).RunAtom<JObject>(conn);
result.Should().BeNull();
}

[Test]
public void try_basic_datetime_deseralization()
{
var obj = new JObject
{
["Name"] = "Brian",
["dob"] = DateTime.Parse("8/24/2016")
};

var fromDb = R.Expr(obj).RunResult<JObject>(conn);
var dateTimeValue = fromDb["dob"] as JValue;
dateTimeValue.Type.Should().Be(JTokenType.Date);
dateTimeValue.Value.Should().BeOfType<DateTime>();
}

}

Expand Down

0 comments on commit 38baa9e

Please sign in to comment.