-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some iso timestamps being strings, not DateTime<Utc> (#499)
* fix: some iso timestamps being strings * fix: register uses dates, not datetimes
- Loading branch information
1 parent
d4377c5
commit eb08793
Showing
8 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,16 @@ | |
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
use std::str::FromStr; | ||
|
||
use chorus::types::{LoginSchema, RegisterSchema}; | ||
#[cfg(target_arch = "wasm32")] | ||
use wasm_bindgen_test::*; | ||
#[cfg(target_arch = "wasm32")] | ||
wasm_bindgen_test_configure!(run_in_browser); | ||
|
||
use chrono::NaiveDate; | ||
|
||
mod common; | ||
|
||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] | ||
|
@@ -16,7 +20,7 @@ async fn test_registration() { | |
let mut bundle = common::setup().await; | ||
let reg = RegisterSchema { | ||
username: "Hiiii".into(), | ||
date_of_birth: Some("2000-01-01".to_string()), | ||
date_of_birth: Some(NaiveDate::from_str("2000-01-01").unwrap()), | ||
consent: true, | ||
..Default::default() | ||
}; | ||
|
@@ -32,7 +36,7 @@ async fn test_login() { | |
username: "Hiiii".into(), | ||
email: Some("[email protected]".into()), | ||
password: Some("Correct-Horse-Battery-Staple1".into()), | ||
date_of_birth: Some("2000-01-01".to_string()), | ||
date_of_birth: Some(NaiveDate::from_str("2000-01-01").unwrap()), | ||
consent: true, | ||
..Default::default() | ||
}; | ||
|
@@ -54,7 +58,7 @@ async fn test_wrong_login() { | |
username: "Hiiii".into(), | ||
email: Some("[email protected]".into()), | ||
password: Some("Correct-Horse-Battery-Staple1".into()), | ||
date_of_birth: Some("2000-01-01".to_string()), | ||
date_of_birth: Some(NaiveDate::from_str("2000-01-01").unwrap()), | ||
consent: true, | ||
..Default::default() | ||
}; | ||
|
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