diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2019-04-28 13:47:58 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2019-04-28 13:47:58 +0200 |
commit | caa7b4429e68135404ad5a01aa1d7f530abae090 (patch) | |
tree | 2f2b2331de7e126bc2552c4e285cd75f69256cf4 /tests | |
parent | 30f65b62e84fcd9975643716d61fa21bc8495291 (diff) | |
download | ramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.tar.gz ramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.tar.bz2 ramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.zip |
Update /screenings endpoint to return full info on screenings.
This makes each screening record self-contained, and the json
payload more consistent with how it semantically fit together.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/apitests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/apitests.rs b/tests/apitests.rs index a488c33..e0803a8 100644 --- a/tests/apitests.rs +++ b/tests/apitests.rs @@ -132,13 +132,13 @@ fn getting_screenings_from_api() { let mut response = client.get("/screenings").dispatch(); assert_eq!(response.content_type(), Some(ContentType::JSON)); - let fetched_screenings: Vec<(Screening, Film, Room)> = + let fetched_screenings: Vec<Screening> = serde_json::from_str(&response.body_string().unwrap()).unwrap(); assert_eq!(fetched_screenings.len(), 1); - let (_scr, ff, rr) = &fetched_screenings[0]; - assert_eq!(ff.title, "Hellraiser"); - assert_eq!(rr.name, "Main room"); + let scr = &fetched_screenings[0]; + assert_eq!(scr.film.title, "Hellraiser"); + assert_eq!(scr.room.name, "Main room"); }); } |