From 3463c9bbec7dd73aeb35779d9809ef68e584d69e Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 25 Mar 2018 23:20:41 +0200 Subject: [PATCH] test: Added orientation test --- tests/test_protocol_v7.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_protocol_v7.rs b/tests/test_protocol_v7.rs index ff6b6f04..430ab68d 100644 --- a/tests/test_protocol_v7.rs +++ b/tests/test_protocol_v7.rs @@ -938,3 +938,9 @@ fn test_thread_id_format() { assert_eq!(serde_json::from_str::("0").unwrap(), v7::ThreadId::Int(0)); assert_eq!(serde_json::from_str::("\"0\"").unwrap(), v7::ThreadId::String("0".into())); } + +#[test] +fn test_orientation() { + assert_eq!(serde_json::to_string(&v7::Orientation::Landscape).unwrap(), "\"landscape\""); + assert_eq!(serde_json::to_string(&v7::Orientation::Portrait).unwrap(), "\"portrait\""); +}